What is the proper way to programmatically close a WinForms application after a certain time?

后端 未结 4 1568
梦谈多话
梦谈多话 2021-01-19 01:25

I start my form in the usual way:

Application.Run(new MainForm());

I want it to open and run until a certain time, then close. I\'ve tried

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-19 01:37

    Is there "ServiceEnded" event? If yes close your form when your service ended.

提交回复
热议问题