no takže kod som si už napísal. ale neviem ako na to s tým že ak sa nepretiahol na Picture1 tak sa vráti na miesto odkial som ho presuval.
kod tu?
Kód:
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.Drag vbBeginDrag
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.Drag vbEndDrag
End Sub
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
Source.Move X, Y
Command1.Move X - Command1.Width / 2, _
Y - Command1.Height / 2
End Sub
Private Sub Picture1_DragDrop(Source As Control, X As Single, Y As Single)
Command1.Visible = False
End Sub