Visual Basic - Drag and drop como???

Life is soft - evento anual de software empresarial
 
Vista:

Drag and drop como???

Publicado por Ana (45 intervenciones) el 14/02/2007 02:26:01
HOLA TENGO UNA APLICACION EN LA Q DEBO MOVER UN CONTROL YA SEA IMAGE O PICTURE BOX O TEXTBOX NO SE CUAlquiera Q SE ENCUENTRA DENTRO DE UN PICTURE BOX, HE PROBADO TODOS LOS Q APARECEN ACA Y NO LO ARRASTRA, SI ME PUEDEN AYUDAR SE LOS AGRADECERIA.-..
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:Drag and drop como???

Publicado por miguel (1042 intervenciones) el 14/02/2007 18:01:18
Primeramente debes poner el control picturebox en el formulario le das clic derecho sobre el picturebox y seleccionas la opcion "Enviar al fondo" y debe de funcionar y colocas tus objetos sobre el picturebox:

Dim oldX As Long, oldY As Long, isMoving As Boolean

Private Sub Command1_MouseDown(Button As Integer, Shift _
As Integer, X As Single, Y As Single)
oldX = X
oldY = Y
isMoving = True
End Sub

Private Sub Command1_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
If isMoving Then
Command1.Top = Command1.Top - (oldY - Y)
Command1.Left = Command1.Left - (oldX - X)
End If
End Sub

Private Sub Command1_MouseUp(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
isMoving = False
End Sub

Nota.Si no te funciona te envío el ejemplo a tu correo.

Saludos!!!
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