Visual Basic - como hago para arrastrar y soltar un picturebox

Life is soft - evento anual de software empresarial
 
Vista:

como hago para arrastrar y soltar un picturebox

Publicado por pipeño (2 intervenciones) el 07/04/2004 02:56:34
como hago para arrastrar y mover un picturebox en un formulario
gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:como hago para arrastrar y soltar un picturebox

Publicado por POLA (522 intervenciones) el 07/04/2004 14:35:13
Te anexo un pequeño código, que espero te sirva.

Public globalX As Integer
Public globalY As Integer

Private Sub Form_DragDrop(Source As Control, X As _
Single, Y As Single)
Picture1.Move X - globalX, Y - globalY
End Sub

Private Sub Picture1_MouseDown(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Picture1.Drag vbBeginDrag
globalX = X
globalY = Y
End Sub

Saludos Pola
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar