At least the way I want it to
I'm trying to write a simple fruit machine app for psychology study. Without the timer bit I can get everything to work properly but I really wanted the reels to be selected one after the other at about 950 ms.
I have initised the time with an interval of 950
The part of my code giving problems is...
Timer1.Enabled = True
Do While GlobalCounter <=4
Select Case GlobalCounter
Case 1
reel1=Rnd(0,9)
filename = "image" & reel1 & ".png"
ReelViews(0).Bitmap = LoadBitmap(File.DirAssets, filename)
Case 2
reel2=Rnd(0,9)
filename = "image" & reel2 & ".png"
ReelViews(1).Bitmap = LoadBitmap(File.DirAssets, filename)
Case 3
reel3=Rnd(0,9)
filename = "image" & reel3 & ".png"
ReelViews(2).Bitmap = LoadBitmap(File.DirAssets, filename)
Case 4
reel4=Rnd(0,9)
filename = "image" & reel4 & ".png"
ReelViews(3).Bitmap = LoadBitmap(File.DirAssets, filename)
End Select
Loop
Timer1.Enabled = False
Sub Timer1_tick
GlobalCounter = GlobalCounter + 1
End Sub
It don't work 'cos I broked it somewhere. Can anyone help please?
I have initised the time with an interval of 950
The part of my code giving problems is...
Timer1.Enabled = True
Do While GlobalCounter <=4
Select Case GlobalCounter
Case 1
reel1=Rnd(0,9)
filename = "image" & reel1 & ".png"
ReelViews(0).Bitmap = LoadBitmap(File.DirAssets, filename)
Case 2
reel2=Rnd(0,9)
filename = "image" & reel2 & ".png"
ReelViews(1).Bitmap = LoadBitmap(File.DirAssets, filename)
Case 3
reel3=Rnd(0,9)
filename = "image" & reel3 & ".png"
ReelViews(2).Bitmap = LoadBitmap(File.DirAssets, filename)
Case 4
reel4=Rnd(0,9)
filename = "image" & reel4 & ".png"
ReelViews(3).Bitmap = LoadBitmap(File.DirAssets, filename)
End Select
Loop
Timer1.Enabled = False
Sub Timer1_tick
GlobalCounter = GlobalCounter + 1
End Sub
It don't work 'cos I broked it somewhere. Can anyone help please?