Link to home
Start Free TrialLog in
Avatar of Tamilselvan
TamilselvanFlag for India

asked on

how to drag and drop the command button in runtime in vb6?

how to drag and drop the command button in runtime in vb6?
Avatar of HooKooDooKu
HooKooDooKu

A similar discussion is open over there...
https://www.experts-exchange.com/questions/24829667/how-to-move-commandbutton-using-mouse-in-vb6.html?cid=1576
Try looking especially at the third answer by BrianVSoft
If you set the command button's dragmode property to automatic, you can use some code like this in the form
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
    Source.Left = X
    Source.Top = Y
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial