firehawk Posted September 13, 2005 Posted September 13, 2005 *sigh* I just dont get it. how do I raise a "safe" event in my UI Form from a worker thread? I do not know/cannot understand how to create events. That's all I want to know! no technical in depth lectures, no nothing. Can't find anything decent on google or if I do find it I can't follow it! Sooo frustrating. using C# (so any code posted please post it in C#) I have: MainForm (UI) ClassA (Worker thread) ClassB (creates worker thread but can also be called from MainForm) if a statusString has been changed in the WorkerThread or in ClassB, I want to notify this event in MainForm. When the MainForm identifies this event, I want to be able to do my own actions, in this case, change the label text on the form to statusString. How? Quote
*Experts* DiverDan Posted September 13, 2005 *Experts* Posted September 13, 2005 I don't know if the separate Thread would get in the way of just declaring a deligate variable With Events. Then when the monitured action occurs Raise an Event with an Event Handler in MainForm to act on the monitured action. Also, where and how is the worker thread created? Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.