Randomly appearing picutres help

bignerdmatt

Newcomer
Joined
Dec 2, 2003
Messages
11
Location
GA
I have 4 lables I would like to have randomly appear one at a time for 30 seconds.


The route I think I should take would be to set them as invisible, and then every 2 seconds make one random label appear.


Any advice for this poor fellow here ?
 
Perhaps someone could "critique" my code. Its pretty lame to be honest, as you can see I dont know my vb that well, but hopefully it gets my point across.

Thanks in advance :)
 
private sub game ()
dim x as "timer"
dim y as "timer2"
panel1 as "1"
panel2 as "2"
panel 3 as "3"
panel 4 as "4"
dim score as "score"
label1 as "score display"
Userbutton1.click
messagebox.show ("click the boxes as many times as you can in 30 seconds")

timer.int- 30000ms
random.integer(1-4)
set 1 as invisible- true
set 2 as invisible - true
set 3 as invisible - true
set 4 as invisible - true

if ingeger = 1 then 1 invisible false timer 2 seconds
if integer =2 then 2 invisible false
if integer = 3 then 3 invisible false
if integer = 4 then 4 invisible false

setclick. if 1 visible = add +1 score
setclick. if 2 visible = add +1 score
setclick. if 3 visible = add +1 score
setclick. if 4 visible = add +1 score
disp score. label1

when timer1=0, messagebox.show "score"

end
 
Im mainly looking for any criticism with my code. As you can see Im pretty lacking in the VB.net terminology.


also, perhaps someone could throw me a bit of code that helps randomize 4 panels to appear one at a time.

I have the form set up, the start button for my game and a timer set up. Im just having trouble with the randomizing part.

Thanks
 
Last edited:
Back
Top