Paren/Child in different threads?
-
Is it possible to make parent and child forms running in the different threads. For example parent form will be in main app thread which launch another thread which creates form and are child to the parent from. Actaualy what I want to achieve to have MDI in which views/child forms running in the own thread. In C++ was 100 methods to it using WinAPI/MFC/ATL/Stingray ... Here I confused to find at least single way to do it. :)
-
Is it possible to make parent and child forms running in the different threads. For example parent form will be in main app thread which launch another thread which creates form and are child to the parent from. Actaualy what I want to achieve to have MDI in which views/child forms running in the own thread. In C++ was 100 methods to it using WinAPI/MFC/ATL/Stingray ... Here I confused to find at least single way to do it. :)
Sure you can, launch the other thread and call Application.Run from the other thread.
void buttonClick(...)
{
new Thread(new ThreadStart(NewThread)).Start();
}void NewThread()
{
Application.Run(new ChildForm());
}Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
Sure you can, launch the other thread and call Application.Run from the other thread.
void buttonClick(...)
{
new Thread(new ThreadStart(NewThread)).Start();
}void NewThread()
{
Application.Run(new ChildForm());
}Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
Could you please explain what is ChildForm. Where it declared (namespace) or it custom with some flags which makes it child. Thanks. :)
Alex_Y wrote:
Could you please explain what is ChildForm.
Nothing special, it's the type name for the form which you want to be displayed in a separate thread. Just replace it your form's class name. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
Alex_Y wrote:
Could you please explain what is ChildForm.
Nothing special, it's the type name for the form which you want to be displayed in a separate thread. Just replace it your form's class name. Regards Senthil _____________________________ My Blog | My Articles | WinMacro