This Program Shows You How To Use Drag & Drop 'Only 5 Lines Of Code
This Program Shows You How To Use Drag & Drop 'Only 5 Lines Of Code
Rate This Program Shows You How To Use Drag & Drop 'Only 5 Lines Of Code
(2(2 Vote))
'Paste This Code In To The Code Window
'Add A CommandButton And Name It Command1
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
Dim w As Integer, h As Integer 'This Sets h & s As Integers
w = X - Source.Width / 2 'Center's Control On mouse Pointer
h = Y - Source.Width / 2 'Center's Control On mouse Pointer
Call Source.Move(w, h) 'Calls w & h Integers
End Sub
Private Sub Form_Load()
Command1.DragMode = 1 'Enables CommandButton To Use Drag And Drop
End Sub
This Program Shows You How To Use Drag & Drop 'Only 5 Lines Of Code Comments
No comments yet — be the first to post one!
Post a Comment