Hello, I'm working on a concentration game, and i'm trying to make the function that will tell if the user matches the flags or does not. So far, I've got it can only tell if they do not match them, but in my loop, it will only work if they click a 3, then a 4. It won't work if they click a 4, and then a 3.
Code:
VB Code:
Dim i As Integer
clickcount = clickcount + 1
lblCover(Index).Visible = False
For i = 0 To 15
If lblCover(i).Visible = False Then
If clickcount = 2 Then
picSecond.Picture = imgPicture(i).Picture
Else
picFirst.Picture = imgPicture(i).Picture
End If
End If
Next i
Call CheckMatch
Last edited by paralinx; Oct 1st, 2005 at 08:35 PM.
I'd have to see your Match routine, but I think you could use the .TAG property of the pictureboxes to store what is in them. Just use the picture number. Then, you could match easily.
I'd have to see your Match routine, but I think you could use the .TAG property of the pictureboxes to store what is in them. Just use the picture number. Then, you could match easily.
my match function is very dumb, but it works somehow. How would I use the .TAG of the images to see if the pictures match?
I think you need another array of default picture names. When you click picture6 and it has image 4 in it, you would want to save pointer(4) to the tag property. The method I posted won't work because you won't be clicking on the same picture twice, so they won't match. If both tags contained pointer(4), they would match.