DESCRIPTION :
Take two picture boxes on form which overlap each other. It we click on first picture it will hide itself and shows second one and if we click second one it will do the same.
CODEING:
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
PictureBox1.Image = Image.FromFile("E:\1.jpg")
PictureBox2.Image = Image.FromFile("E:\2.jpg")
PictureBox2.Visible = False
End Sub
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click, PictureBox1.Click
If PictureBox2.Visible = False ThenPictureBox2.Visible = True
Else
PictureBox2.Visible = False
End If
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.Close()
End Sub
End Class
Comments
Post a Comment