domingo, 12 de abril de 2015

Drag y Drop (Ej. 1)




' gambas class file

'by postapase

Public Sub Form_Open()
Me.Center
End

Public Sub Button1_Drop()
Button1.Picture = Picture[Drag.Data]
End

Public Sub Button2_MouseDrag()
If Mouse.Left Then
Button2.Drag("icon:/64/linux")
Endif
End

Public Sub Button3_MouseDrag()
If Mouse.Left Then
Button3.Drag("icon:/64/book")
Endif
End

Public Sub Button4_MouseDrag()
If Mouse.Left Then
Button4.Drag("icon:/64/gambas")
Endif
End

Public Sub Button5_MouseDrag()
If Mouse.Left Then
Button5.Drag("icon:/64/gnu")
Endif
End

Public Sub Button1_Click()
Button1.Picture = Null
End


Código fuente: ArrastrarYsoltar-0.0.1.tar.gz


Ejemplo 2:


' gambas class file

'by postapase

Public Sub Form_Open()
Me.Center
End

Public Sub Button1_Drop()
Button1.Picture = Drag.Data.Picture
End

Public Sub Button2_MouseDrag()
If Mouse.Left Then
Button2.Drag(Button2.Picture.Image)
Endif
End

Public Sub Button3_MouseDrag()
If Mouse.Left Then
Button3.Drag(Button3.Picture.Image)
Endif
End

Public Sub Button4_MouseDrag()
If Mouse.Left Then
Button4.Drag(Button4.Picture.Image)
Endif
End

Public Sub Button5_MouseDrag()
If Mouse.Left Then
Button5.Drag(Button5.Picture.Image)
Endif
End

Public Sub Button1_Click()
Button1.Picture = Null
End

No hay comentarios.:

Publicar un comentario

Related Posts Plugin for WordPress, Blogger...

Facebook

www.gambas-es.org

www.gambas-es.org
Si quieres que tu curva de aprendizaje sea rápida, regístrate en este gran foro en español.