switch pictures with buttons vb.net

The solution for “switch pictures with buttons vb.net” can be found here. The following code will assist you in solving the problem.

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
PictureBox1.Tag = Not CBool(PictureBox1.Tag)
PictureBox1.Image = If(CBool(PictureBox1.Tag), My.Resources.[Picture 1], My.Resources.[Picture 2])
End Sub

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts