Hey,
I'm a beginner so be easy on me
I'm creating a t-shirt designer program for my college project.
So I've got a form with 5 different images (PictureBox) on it, the page where they choose the design of the t-shirt.
I want the user to be able to click on
one of them (and only one of them), which then highlights it (change BackColor?), then click the Next button.
I can do this, which, when you click on the image Design1 it changes the BackColor to blue.
Code:
Private Sub Design1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Design1.Click
Design1.BackColor = Color.Blue
End Sub
But then I need to be able to click it again to unhighlight it.
The only thing I could think of was..
Code:
Private Sub Design1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Design1.Click
Design1.BackColor = Color.Blue
If Design1.BackColor = Color.Blue Then
Design1.BackColor = Color.Transparent
End If
End Sub
But obviously that just goes round in circles. Clicking it changes it to blue, then "if it's blue - change to transparent", therefore it does nothing.
How can I do that?
Thanks.