Take 7 picturebox
as you are saying, suppose the main picturebox
is Picturebox1 and the underneath ones are Picturebox2
, Picturebox3
, Picturebox4
, Picturebox5
, Picturebox6
, Picturebox7
.
If correct PictureBox
are 2, 3, 4, then, write the following code under their click events.
Private Sub Form1_Load () Handles Mybase.Load
Textbox1.Hide
Textbox1.Text = 0
End Sub
Private Sub Picturebox2_Click () Handles Picturebox2.Click
Textbox1.Text = Val(Textbox1.text) + 1
End Sub
Private Sub Picturebox3_Click () Handles Picturebox3.Click
Textbox1.Text = Val(Textbox1.text) + 1
End Sub
Private Sub Picturebox3_Click () Handles Picturebox3.Click
Textbox1.Text = Val(Textbox1.text) + 1
End Sub
Private Sub Textbox1_TextChanged () Handles Textbox1.TextChanged
If Val(Textbox1.Text) = 3 then
'things here you want to do when correct pictures are clicked
End If
End Sub
I hope you will understand!
manpreet
Best Answer
2 years ago
I am making a game to help kids learn the different parts of objects as a part of 9th grade tech class syllabus. There will be a picture of a plane and 6 smaller pictures">pictures underneath it. Only three of the pictures">pictures will be components of a plane, the others won't.
Only when the person playing has clicked the three right components will they win the game.
I can't figure out a way to code my program so that all three pictures">pictures need to be clicked before my program advances.