Oct 1st, 2005, 02:47 PM
#1
Re: Looping to see if something = something
See post #6. Use the picture index as the tag.
Oct 1st, 2005, 03:13 PM
#2
Thread Starter
Fanatic Member
Re: Looping to see if something = something
I'm trying to use this, but it is not working here is my code
VB Code:
Private Sub lblCover_Click(Index As Integer)
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
picSecond.Tag = i
Else
picFirst.Picture = imgPicture(i).Picture
picFirst.Tag = i
End If
End If
Next i
If clickcount = 2 Then
Call CheckMatch
End If
End Sub
Public Sub CheckMatch()
Dim i As Integer
If picFirst.Tag = picSecond.Tag Then
tmrWin.Enabled = True
clickcount = 0
Else
tmrLose.Enabled = True
clickcount = 0
End If
End Sub
Oct 1st, 2005, 03:47 PM
#3
Re: Looping to see if something = something
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.
Post your project and I'll look at it.
Oct 1st, 2005, 04:38 PM
#4
Thread Starter
Fanatic Member
Re: Looping to see if something = something
Attached Files
Oct 1st, 2005, 05:49 PM
#5
Re: Looping to see if something = something
I'll look at it when I get back.
Oct 1st, 2005, 06:02 PM
#6
Thread Starter
Fanatic Member
Re: Looping to see if something = something
Take your time
Oct 1st, 2005, 08:13 PM
#7
Re: Looping to see if something = something
I had to make a few changes, but I think you'll like it
Attached Files
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width