Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Problem while closing the win form
 

Problem while closing the win form

While Closing the form i have given Application.ExitThread();and also i have tried with Application.Exit();

But if i use this function while closing the win form it opens some other process and close. How to avoid this opening other process?

Ganapatisb  Friday, September 18, 2009 12:30 PM
Could you try Environment.Exit(0) and tell if it works fine?
Tamer Oz  Sunday, September 20, 2009 9:41 AM
Why do you need Application.ExitThread() or Application.Exit()?? Any single-threaded application will naturally exit once all of its forms are closed, either by the user or programmatically via Form.Close(). You should not need those under pretty much any circumstance. Please explain a bit more.
MCP
webJose  Saturday, September 19, 2009 4:39 AM
Could you try Environment.Exit(0) and tell if it works fine?
Tamer Oz  Sunday, September 20, 2009 9:41 AM
Hi Tamer,

Its working fine.. thanks a lot..
Ganapatisb  Monday, September 21, 2009 5:27 AM

You can use google to search for other answers

Custom Search

More Threads

• How to enable mouse events on the hosted form
• How can I hide MainMenu in VS2003 Designer
• Printing a pictureBox
• VS.NET Toolbox
• Inherited User Control Question
• System.Windows.Forms won't load (VS can't seem to find it)
• Binding, Filtering and ConstraintException
• Control.Visible Property Problem
• How to design a form on Blend and use it in a VB 2005 project?
• Something about FlexGrid(old thing but i have to use it)