Dave wrote:
Hi,
I am writing a C# win form application that show 3 different winform dialog
and i wanf that every form dialog will run in a differnt thread, how can i
do that?
How can i create or show a win form in differnt thread?, can you send me an
example?
Thanks.
You can do so by creating additional message loop in the new thread by
calling
"Application.Run(formObj)".
Firstly, create a new thread,
....
new Thread(new ThreadStart(NewMessageLoopFun));
....
Secondly, in the new thread, create a Form and call "Application.Run"
void NewMessageLoopFun()
{
....
FormX f=new FormX(..);
Application.Run(f)
....
}
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk