0% found this document useful (0 votes)
4 views3 pages

Picture Box Snippet Code

The document contains code for a Windows Forms application with two forms, Form1 and Form3. In Form1, clicking Button1 opens Form2 and hides Form1, but there is a duplicate event handler for Button1 that opens Form3 instead. Form3 has multiple buttons that, when clicked, change the image displayed in PictureBox1 using resources.

Uploaded by

Shiela R. Folgar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Picture Box Snippet Code

The document contains code for a Windows Forms application with two forms, Form1 and Form3. In Form1, clicking Button1 opens Form2 and hides Form1, but there is a duplicate event handler for Button1 that opens Form3 instead. Form3 has multiple buttons that, when clicked, change the image displayed in PictureBox1 using resources.

Uploaded by

Shiela R. Folgar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Public Class Form1

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles


Button1.Click
Form2.Show()
Me.Hide()
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


Form3.Show()
Me.Hide()
End Sub
End Class
Public Class Form3
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
PictureBox1.Image = My.Resources.image1
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
PictureBox1.Image = My.Resources.images2
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles


Button3.Click
PictureBox1.Image = My.Resources.images3
End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles


Button4.Click
PictureBox1.Image = My.Resources.images4
End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles


Button5.Click
PictureBox1.Image = My.Resources.images5
End Sub

Private Sub Button6_Click(sender As Object, e As EventArgs) Handles


Button6.Click
PictureBox1.Image = My.Resources.images6
End Sub

End Class

You might also like