Windows Forms Question (C++)
-
I am a relatively new C++ user. I am developing a program to run a control algorithm. Basically what the program does is communicate with an analog I/O card that I have installed. It reads voltage values from the I/O card and uses them to compute and output a control value to a separate channel. I am currently attempting to use windows forms to accomplish this. When I run the program, I want a form to come up that allows me to change control parameters. There will be a "start" button which begins execution of the control algorithm (essentially just a program loop). Then, I want a "stop" button which terminates execution of the control loop. The problem that I'm having is that I can't figure out how to use a Windows Forms button to terminate a program loop. Can anyone offer any suggestions here? Andrew Krajnik
-
I am a relatively new C++ user. I am developing a program to run a control algorithm. Basically what the program does is communicate with an analog I/O card that I have installed. It reads voltage values from the I/O card and uses them to compute and output a control value to a separate channel. I am currently attempting to use windows forms to accomplish this. When I run the program, I want a form to come up that allows me to change control parameters. There will be a "start" button which begins execution of the control algorithm (essentially just a program loop). Then, I want a "stop" button which terminates execution of the control loop. The problem that I'm having is that I can't figure out how to use a Windows Forms button to terminate a program loop. Can anyone offer any suggestions here? Andrew Krajnik
use thread for your application. you can run your algorithm on thread. then only u can able to click the stop button. there is lot of articles in this site for thread. go thru that. have a nice day! Murali.M