i simply need to move a picture where the user drags and drops it to. when i move a picture and drop it, it goes back to where it was. what kind of code do i need to place it where it was dropped.
Place a picture box on a form.
Put a picture in the picture box.
Set the OLEDragMode of the Picture box to Automatic.
Set the OLEDropMode of the Form to Manual.
Paste this code in the form
Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Left = X
Picture1.Top = Y
End Sub
Run the application. The picure will drop where ever you drag it.
Snaggs
tribesaddict@swbell.net
To define recursion, we must first define recursion.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.