G
Guest
Hi everybody
I'm going crazy with this..
I'm developing an application for WM2003 with VS.NET 2003 and C#
In my application, in a form that is not the beginning form (where the "Main" function is), I start a secondary thread that should periodically update the GUI. To do this I use "Invoke" to call the right function in the main thread
The problem is that while the thread does its things, asynchronous user interaction with the GUI is possible. When the thread invokes the function of the main thread, if a user interaction occurs it crashes the application. A typical interaction is the use of the scroll bar
I think that the problem is that while the invoked function is executing, the application tries to execute the function associated to the Scroll Bar (these two functions are implemented in the same class): that is tha application tries to execute two different functions of the same class at the same time --> crash
Which could be a possible solution? Could MessageWindow solve it
I think that if I could manage the order of the messages that are executed by my application, I could solve it. Am I right? The problem is that I don't have any idea on how to do it..
Thank you fo your help
Stefan
I'm going crazy with this..
I'm developing an application for WM2003 with VS.NET 2003 and C#
In my application, in a form that is not the beginning form (where the "Main" function is), I start a secondary thread that should periodically update the GUI. To do this I use "Invoke" to call the right function in the main thread
The problem is that while the thread does its things, asynchronous user interaction with the GUI is possible. When the thread invokes the function of the main thread, if a user interaction occurs it crashes the application. A typical interaction is the use of the scroll bar
I think that the problem is that while the invoked function is executing, the application tries to execute the function associated to the Scroll Bar (these two functions are implemented in the same class): that is tha application tries to execute two different functions of the same class at the same time --> crash
Which could be a possible solution? Could MessageWindow solve it
I think that if I could manage the order of the messages that are executed by my application, I could solve it. Am I right? The problem is that I don't have any idea on how to do it..
Thank you fo your help
Stefan