I generated the C#-Win App exe using visual studio setup project. After closing the installed app,still process is running in task manager. I tried with Application.Exit() in Dispose() of every form. but while navigating one form to another form i used this.Hide().so each navigation application closing.
i can't u开发者_JAVA百科se MDI concept now..
How to do it?
Please guide me..
In your last form handle the Closing
event and then call Envirunment.Exit, it will cause the same effect you want. So:
private void OnFormClosing(object sender, FormClosingEventArgs e)
{
Environment.Exit(0);
}
in the main form Form_Close
event handler you can have Application.ExitThread()
Thanks for your replies
In the each form FormClosed event handler i called the Application.Exit();
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
}
It's working great..
精彩评论