Tema: drag&drop
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/05/2007, 03:11
F_rank_cisco
 
Fecha de Ingreso: agosto-2006
Mensajes: 45
Antigüedad: 17 años, 8 meses
Puntos: 0
Re: drag&drop

Al fin lo conseguí, es tan simple como esto.

Dim x1 As Single, y1 As Single

Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
Source.Move X - x1, Y - y1
Source.Visible = True
End Sub

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
x1 = X
y1 = Y
Picture1.Drag vbBeginDrag
Picture1.Visible = False
Picture1.Drag
End If
End Sub