Hi, In the former days of programming I used an endless loop in a subroutine to keep on going with a keypress to stop. Anybody got an idea how to do this with DO UNTIL or DO WHILE? Marc
It is better to leave this method for the former days of programming It can be achieved using the DoEvents keyword. Using events driven programming you could just use the KeyPress event to do what you like.
Yes, Erel, I agree but I want to create an endless loop to keep on going (like bounce a ball against the screensides) without using the timeticksub. Marc
Hi, I don't know if it is what you really want, but endless loop you can make this way : do until 0 = 1 doevents loop Petr
There are no OnKey or InKey keywords in Basic4ppc as it is an event driven. Why don't you want to use a timer?
The timer is to slow for what I want I think. I solved the problem in a "for next" loop. Now the ball really bounces (see post moving figures) Marc
Moving images refers to this topic http://www.basic4ppc.com/forum/showthread.php?t=186 Regards, RandomCoder
RandomCoder I don't think that was what he refered to, since he talks abou using a for next loop. I think he is preparing a new post? Maybe Im wrong, I don't know...
Stellaferox used a for next loop to bounce the ball. I'm presuming that's what he's refering too. Regards, RandomCoder
Yep, that's right. I tried to use a FORNEXT LOOP but fell back on a DO UNTIL loop that endlessly goes on and bounces the ball to the screensides (see code) Marc