How to run a form using your own message pump?

I have an application in which I need to open many forms that are heterogeneous for my own and work independently. Then my application switches to blocking during long operations (it is impossible to make these operations asynchronous). Therefore, I would like to run these forms in a separate thread using my own message pump. Any way to do this?

+3
source share
1 answer
Application.Run();

This should run the form in its own branch with its own message pump.

EDIT: http://en.csharp-online.net/Application_Architecture_in_Windows_Forms_2.0%E2%80%94Application_Lifetime

, Application.Run, , .

EDIT # 2: http://msdn.microsoft.com/en-us/library/system.windows.forms.application.run(VS.71).aspx

. , ThreadPool , , Application.Run().

+3

Source: https://habr.com/ru/post/1768360/


All Articles