C# Winform The process still on Windows Task list manager after close programme

前端 未结 6 1733
我在风中等你
我在风中等你 2021-01-16 21:46

why The process still on Windows Task list manager after close programme ?

i use login Form.cs

 [STAThread]
        static void Main()
        {
             


        
6条回答
  •  走了就别回头了
    2021-01-16 22:23

    This is because the application message loop is associated with your Login form (Application.Run(new Login()) does this), so you need to close the form which started the application to end the process.

    Alternatively, you could just call LoginForm.Show(), before Application.Run, store credentials somewhere and then call Application.Run(new Main_Usr)

提交回复
热议问题