TheSwamp
Code Red => VB(A) => Topic started by: M-dub on August 31, 2004, 05:28:38 PM
-
As I stated in a previous post, I'm an extreme newbie to VB and I'm having a hard time with this little application I'm writing. I can't figure out how to re-enable objects I've disabled. Have a look at the code and tell me if you a) Don't know what I'm talking about or b) know exactly what I'm talking about and that you can help me out.
Dim Sel As Integer
Dim i As Integer
Private Sub imgMemory_Click(Index As Integer)
tmrShow.Enabled = True
imgMemory(Index).Visible = False
Sel = ((Sel) + 1)
If Sel = 2 Then
For i = 0 To 15
imgMemory(i).Enabled = False
Next i
End If
End Sub
Private Sub tmrShow_Timer()
For i = 0 To 15
imgMemory(i).Visible = True
Next i
tmrShow.Enabled = False
End Sub
Thanks a LOT!
Mike
-
object.enabled = true
-
Where? I've tried it in a bunch of places and it doesn't work (for me...)
Does it have something to do with SEL? When it runs through the code, would SEL be set back to zero or does it stay at 2?
Thanks Keith
-
Found it!
Dim Sel As Integer
Dim i As Integer
Private Sub imgMemory_Click(Index As Integer)
tmrShow.Enabled = True
imgMemory(Index).Visible = False
Sel = ((Sel) + 1)
If Sel = 2 Then
For i = 0 To 15
imgMemory(i).Enabled = False
Next i
End If
End Sub
Private Sub tmrShow_Timer()
For i = 0 To 15
imgMemory(i).Visible = True
imgMemory(i).Enabled = True
Next i
Sel = 0
tmrShow.Enabled = False
End Sub
-
Ok, you'll laugh when you see this, but I'm having a really hard time with this...as 'simple' as the program is. I've placed my application in the lily pond HERE (http://theswamp.org/lilly_pond/mike/Memory.zip?nossi=1).
This is a 'Memory' game and I'm trying to get it so that when a match is made, the image hiding the pictures remains invisible. I either get all of them, or none of them. Anyone willing to help me on this?
Thanks,
Mike