Click to See Complete Forum and Search --> : Dragging PictureBoxes


StuMan8424
July 9th, 2001, 11:57 PM
How can I have it so the user can drag and drop picture boxes over each other?

Cimperiali
July 10th, 2001, 05:34 AM
for example:

'four pictureboxes, the first to drag to
'all with drag property set to manual
option Explicit
private Sub Form_DragOver(Source as Control, X as Single, Y as Single, State as Integer)

Source.MousePointer = vbNoDrop

End Sub
private Sub Picture1_DragDrop(Source as Control, X as Single, Y as Single)
Picture1.Picture = Source.Picture

End Sub

private Sub Picture1_DragOver(Source as Control, X as Single, Y as Single, State as Integer)
Source.MousePointer = vbDefault
End Sub

private Sub Picture2_MouseDown(Button as Integer, Shift as Integer, X as Single, Y as Single)
Picture2.Drag vbBeginDrag

End Sub

private Sub Picture3_MouseDown(Button as Integer, Shift as Integer, X as Single, Y as Single)
Picture3.Drag vbBeginDrag

End Sub
private Sub Picture4_MouseDown(Button as Integer, Shift as Integer, X as Single, Y as Single)
Picture4.Drag vbBeginDrag

End Sub




Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.

StuMan8424
July 10th, 2001, 04:57 PM
I want something kind of like what happens at:

http://www.geocities.com/chocolatcreme/dollmaker.html