Results 1 to 3 of 3

Thread: How can I Drag lstbox to frm2

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    258

    Question

    Hey ,

    I'm trying to drag a list box from one form to another . How can I acomplish this ?

    []P
    Visual Basic 6 SP4 on win98se

    QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    hmm.. you mean a whole control or duplicate just the contents to a listbox that already exists? (the last one would be not that easy I think, never done it)
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3
    Guest
    Maybe something like this?

    Code:
    'Form1:
    
    Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    List1.Drag vbBeginDrag
    End Sub
    
    
    'Form2:
    
    
    Dim WithEvents lstCtl As VB.ListBox
    
    Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
            Set lstCtl = Controls.Add("VB.Listbox", "List1", Form2)
            lstCtl.Visible = True
    End Sub

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