|
-
Mar 26th, 2003, 07:24 PM
#1
Thread Starter
Fanatic Member
Index
I have a game where I roll a dice, when it finishes it's either: imgdie(0), imgdie(1), imgdie(2), imgdie(3), imgdie(4) or imgdie(5)
how can I say
label1.caption = "[THE INDEX OF THE DIE IT ENDED ON]"
??
thx in advance
"A RESPECTED scientist has put forward the stunning - if unsavoury - possibility that humans are descended from sewage dumped overboard by aliens."
"First we read that we are the creation of God, then scientists say we are descended from apes. Now they say we're some sort of alien poo. How much further can we sink?"
- Robert Matthews, Science Correspondent
-
Mar 26th, 2003, 07:26 PM
#2
Frenzied Member
Set the caption of the label at the same time that you choose the die. Post your code for a more detailed response...
-
Mar 26th, 2003, 07:26 PM
#3
r u using an 'ImageList' Component?
-
Mar 26th, 2003, 07:28 PM
#4
Originally posted by seaweed
Set the caption of the label at the same time that you choose the die. Post your code for a more detailed response...
Good point!
-
Mar 26th, 2003, 07:40 PM
#5
Thread Starter
Fanatic Member
Originally posted by seaweed
Set the caption of the label at the same time that you choose the die. Post your code for a more detailed response...
no, I don't need to post my code, you have a good Idea there
thx
"A RESPECTED scientist has put forward the stunning - if unsavoury - possibility that humans are descended from sewage dumped overboard by aliens."
"First we read that we are the creation of God, then scientists say we are descended from apes. Now they say we're some sort of alien poo. How much further can we sink?"
- Robert Matthews, Science Correspondent
-
Mar 26th, 2003, 08:06 PM
#6
Thread Starter
Fanatic Member
finally ... that wouldnt work... here's my code:
VB Code:
Private Sub TmrDé_Timer()
Static I As Integer
If Toure = 1 Then
CmdDéJoueur.Picture = ImgDé(Int(Rnd * 4 + 1))
ElseIf Toure = 2 Then
CmdDéPC.Picture = ImgDé(Int(Rnd * 4 + 1))
End If
I = I + 1
If I >= 10 Then
I = 0
TmrDé.Enabled = False
End If
End Sub
"A RESPECTED scientist has put forward the stunning - if unsavoury - possibility that humans are descended from sewage dumped overboard by aliens."
"First we read that we are the creation of God, then scientists say we are descended from apes. Now they say we're some sort of alien poo. How much further can we sink?"
- Robert Matthews, Science Correspondent
-
Mar 26th, 2003, 08:10 PM
#7
Thread Starter
Fanatic Member
"A RESPECTED scientist has put forward the stunning - if unsavoury - possibility that humans are descended from sewage dumped overboard by aliens."
"First we read that we are the creation of God, then scientists say we are descended from apes. Now they say we're some sort of alien poo. How much further can we sink?"
- Robert Matthews, Science Correspondent
-
Mar 26th, 2003, 08:14 PM
#8
Frenzied Member
I don't see where you added any code to set the Label caption. See if this helps:
VB Code:
Private Sub TmrDé_Timer()
Static I As Integer
Dim intRandomNumber As Integer
' Pick a random number
intRandomNumber = Int(Rnd * 4 + 1)
' Set the picture property
If Toure = 1 Then
CmdDéJoueur.Picture = ImgDé(intRandomNumber)
ElseIf Toure = 2 Then
CmdDéPC.Picture = ImgDé(intRandomNumber)
End If
' Set the label caption
Label1.Caption = intRandomNumber
I = I + 1
If I >= 10 Then
I = 0
TmrDé.Enabled = False
End If
End Sub
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
|