C# - Application.Run()

前端 未结 2 1698
野趣味
野趣味 2021-02-13 09:08

I am just starting .Net development (C#) and have come across some code that has me slightly confused....

If I have

Form myForm = new Form();

2条回答
  •  遥遥无期
    2021-02-13 10:07

    to start an application with a main form, so that the application terminates when the main form is closed. it will be associated to the current thread. it runs this form in a message loop.

    Message Loop means : They act upon messages that the operating system posts to the main thread of the application. These messages are received from the message queue by the application by repeatedly calling the GetMessage (PeekMessage) function in a section of code called the "event loop."

    Application Run()

提交回复
热议问题