(10-21-2022, 05:34 PM)Dimster Wrote: Timer I have always used more for those routines where I need the min, hour, day, year type of stuff and can't recall the last time I use _Limit. It had never occurred to me to use either one of those to control the speed of the drop down.
I do see where you are recommending _Delay as the best practice for this kind of speed control. It definitely works but when I ran it in that little snippet it seemed the graphic drop down box was picking up speed as it dropped. Optical illusion? Programming without glasses? It really isn't that big of deal. The _Delay is a much more elegant solution.
Thanks Steve and Mr. Re-Gifted (loved that line in another thread Pete)
That's because of 2 things.
1) Your first green block is so much thicker that it looks like it starts faster.
2) You are going back to a thin block but growing it by one with each next loop, so it looks like it is speeding up as it continues.
Something like this may be more of what you are trying for...
Code: (Select All)
CLS
SCREEN _NEWIMAGE(1200, 900, 32)
DIM SHARED DarkGreen&
DIM SHARED Yellow&
DIM SHARED Pink&
DarkGreen& = _RGB32(0, 129, 0)
Yellow& = _RGB(255, 255, 0)
Pink& = _RGB(216, 50, 166)
'Large background box
LINE (0, 0)-(1199, 50), Pink&, BF
c1 = 7
r1 = 7
c2 = 126
r2 = 46
'The 5 smaller box
LINE (c1, r1)-(c2, r2), DarkGreen&, BF
SLEEP
COLOR Yellow&
_PRINTSTRING (12, 15), "Opening Info"
r1 = 51
r2 = 93 - 28 ' Smaller or the first block is too thick.
'The Drop Down
FOR DDwn = 1 TO 25
LINE (c1, r1)-(c2, r2), DarkGreen&, BF
_DELAY .05 ' <============================== Change the value to increase or decrease the delay time.
r1 = r1 + 15
r2 = r2 + 15
NEXT
Pete - The Re-Gifted Child.