开发者

Closing MDIParent Form, application is still running in task manager

So I can't seem to completely开发者_高级运维 exit the application, I want this to happen when the user clicks the (x) button. is there a certain command like application.exit I can put somewhere (maybe FormClosed()?)

Thank you!


After closing the last form, the application should exit on its own.

If it isn't, you probably have some other code which is still running.
Pause the program in a debugger and cehck what it's doing.


You need an Event Handler that runs after that particular MDIParent closes. Example:

 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            Application.Exit();
        }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜