I have a program that samples the serial port continually based on a number the user provides. Ive been trying to get an event to STOP the loop with a button without success.
For example:
While stop_button = false
for user_count = 1 to variable_number
serialportx.readline
' here I want to trap an event that sets user count to 20 or stop the for loop
' from executing.
next
end while
Any ideas?
I never can get the following when the loop is executing.
1. A button click event to return a TRUE
2. a status of the button (TRUE or FALSE) to print to a textbox.
3. Any user control to be visible or not visible
What is it about the loop that I'm missing?
Any help would be appreciated.
Thanks,
Gary
For example:
While stop_button = false
for user_count = 1 to variable_number
serialportx.readline
' here I want to trap an event that sets user count to 20 or stop the for loop
' from executing.
next
end while
Any ideas?
I never can get the following when the loop is executing.
1. A button click event to return a TRUE
2. a status of the button (TRUE or FALSE) to print to a textbox.
3. Any user control to be visible or not visible
What is it about the loop that I'm missing?
Any help would be appreciated.
Thanks,
Gary