February 4th, 2013, 01:01 PM
I am new to windows programming, in particular Visual C++, as I am a long time web developer.
I am developing a windows forms app in express 2010, and I am struggling to figure out how to do something.
I have a simple form that upon a button click, will go out to the serial port and read the serial port and display it to a text box. It works as coded.
The problem I have is I don't want to have to click the button each time, and would rather have the method just continuously run asynchronously, and update the text box whenever new data comes in.
Right now, if I run a do while loop, it basically freezes up my form as the entire app is waiting for the button click event to finish.
Is there a way for me to call a method asynchronously, and get info back, when it receives new data?
I know in some languages there are things like delegates and async function calls, but I am very new to VC++.
Any help would be appreciated.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!