Pasos para crear un rompecabeza. (SEMANA 26)
1. Inicializar el programa, maximizamos el formulario ubicandonos en la propiedad windowstate-maximized, luego cambiamos el color de de fondo del formulario y procedemos a descargar la imagen de la siguiente forma (imagenes de san valentin + jpg) y la pegamos en el programa paint.
2. Una vez recortada la imagen en fragmento y pegada en un objeto (image) debemos seleccionar el objeto (picturebox) y graficarlo en igual dimension que el fragmento de la imagen colocada en el formulario.
3. A cada picturebox lo seleccionamos y nos ubicamos en la propiedad (dragmode-1 automatical); luego a cada picturebox le asignaremos el siguiente codigo cambiando el evento clic para drapdrog, borrando las 2 lines del evento clic.
Picture1.Picture = Source.Picture
Source.Visible = False
Private Sub Picture2_DragDrop(Source As Control, X As Single, Y As Single)
Picture2.Picture = Source.Picture
Source.Visible = False
End Sub
Private Sub Picture3_DragDrop(Source As Control, X As Single, Y As Single)
Picture3.Picture = Source.Picture
Source.Visible = False
End Sub
Private Sub Picture4_DragDrop(Source As Control, X As Single, Y As Single)
Picture4.Picture = Source.Picture
Source.Visible = False
End Sub
Private Sub Picture5_DragDrop(Source As Control, X As Single, Y As Single)
Picture5.Picture = Source.Picture
Source.Visible = False
End Sub
Private Sub Picture6_DragDrop(Source As Control, X As Single, Y As Single)
Picture6.Picture = Source.Picture
Source.Visible = False
End Sub
Private Sub Picture7_DragDrop(Source As Control, X As Single, Y As Single)
Picture7.Picture = Source.Picture
Source.Visible = False
End Sub
Private Sub Picture8_DragDrop(Source As Control, X As Single, Y As Single)
Picture8.Picture = Source.Picture
Source.Visible = False
End Sub
Private Sub Picture9_DragDrop(Source As Control, X As Single, Y As Single)
Picture9.Picture = Source.Picture
Source.Visible = False
End Sub
Comentarios
Publicar un comentario