chris_bdnsee
14-03-2009, 20:16
Hello,
i am rather new to TB - but for sure love it from day one....
While I am speeding up my roosty skills in basic I have one question, which is more related to design.
I have a simple form with two buttons (not using callbacks - yet).
One button starts a loop which runs forever (while loop), the other button contains code to intercept the global variable from the loop of button 1.
I have added a sleep statement in buttoon1 and a couple of doevents.
however, the doevents cleary help other apps to get some time to process, but I am not able to get thinbasic to react on a click on the button2 (which would stop the loop of button1).
The only way to end the process is by closing down in the taskmanager.
Now the question.
How do I need to design both code fragments that I could intercept a loop from an other piece of code.
Thank you for any idea.....
best regards
Christian
i am rather new to TB - but for sure love it from day one....
While I am speeding up my roosty skills in basic I have one question, which is more related to design.
I have a simple form with two buttons (not using callbacks - yet).
One button starts a loop which runs forever (while loop), the other button contains code to intercept the global variable from the loop of button 1.
I have added a sleep statement in buttoon1 and a couple of doevents.
however, the doevents cleary help other apps to get some time to process, but I am not able to get thinbasic to react on a click on the button2 (which would stop the loop of button1).
The only way to end the process is by closing down in the taskmanager.
Now the question.
How do I need to design both code fragments that I could intercept a loop from an other piece of code.
Thank you for any idea.....
best regards
Christian