Two UI Thread in C# windows Application

前端 未结 3 1631
长发绾君心
长发绾君心 2020-12-18 09:22

How can I implement two ui threads in a C# windows application?

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-18 09:30

    Call Application.Run(...) in a new thread and it will open the form with its own message-loop.

    new Thread(() => Application.Run(someForm)).Start();
    

提交回复
热议问题