07-18-2003, 08:31 AM
I'm trying to get a label to randomly appear then dissapear (a side scroll target) within another label, how would I go about randomizing the number? I think if I had some kind of randomize type code I could smash it into the label with <>, just dont know how to get it to random out that number.
07-18-2003, 08:38 AM
'put the rest in a timer or something
Dim intShow as Integer
intShow = CInt(Rnd)
If intShow = 1 then
Label.Visible = True
Label.Visible = False
07-18-2003, 09:04 AM
I'm just learning vb so this might sound really stupid but shouldnt this work?
label1.left = rnd >= 240 <= 5520
I'm trying to tell it to randomize the left property of label1 greater or equal to 240 and less than or equal to 5520, looking at it, it doesnt make sense but in my head it seems like it could work lol
07-18-2003, 09:07 AM
no, that won't work. check out this link. it is a tutorial on random number
07-18-2003, 09:10 AM
ooh...thats what you want...you've got most of the code...just review the syntax for random number generation...
07-18-2003, 09:39 AM
awesome! thanks so much, I feel my proud little newb vains flowing with code hehe