Multiple UI threads in a single application
-
I have an application that consists of a main windows form and a 2nd thread that handles communications back to a server. Based on a command stream from the server the main thread starts other windows forms that share an event/notification message structure. Since each of the newly created windows forms totally control the UI and handle messages related to the tool passed through the event system I wanted to run each on an independent UI thread instead of having all windows running off of the single main UI thread. In playing around with this I have not found any examples and have been unsuccesful at trying to figure out a structure that would do what I'm trying to accomplish. Any suggestions or pointers. Thanks Neil Lamka neil@meetingworks.com
-
I have an application that consists of a main windows form and a 2nd thread that handles communications back to a server. Based on a command stream from the server the main thread starts other windows forms that share an event/notification message structure. Since each of the newly created windows forms totally control the UI and handle messages related to the tool passed through the event system I wanted to run each on an independent UI thread instead of having all windows running off of the single main UI thread. In playing around with this I have not found any examples and have been unsuccesful at trying to figure out a structure that would do what I'm trying to accomplish. Any suggestions or pointers. Thanks Neil Lamka neil@meetingworks.com
This will do the trick
void UIThread()
{
Form yourForm = new Form();
Application.Run(yourForm);
}
}Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
This will do the trick
void UIThread()
{
Form yourForm = new Form();
Application.Run(yourForm);
}
}Regards Senthil _____________________________ My Blog | My Articles | WinMacro
Thanks much, I'll give that a try. Neil Lamka neil@meetingworks.com