Results 1 to 3 of 3

Thread: Drag and drop between two list box

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Singapore
    Posts
    10

    Question

    Hi all,

    I am currently using command buttons to tell my program
    to transfer the contents of one listbox to another.

    How could I do the drag and drop function between two listbox?? Thanx in advance.


  2. #2
    Guest
    Try this:
    Code:
    Dim StartDrag As Boolean
    
    Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        StartDrag = True
        strTemp = List1.Text
    End Sub
    
    Private Sub List2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If StartDrag = True Then
            List2.AddItem List1.Text
            List1.RemoveItem List1.ListIndex
        End If
        StartDrag = False
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Singapore
    Posts
    10

    Wink

    I discovered the solution I wanted with the OLE_dragdrop.
    Thanx for your kind and prompt assistance.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width