What method can I call to terminate my Forms-based application and give
control back to the system?

Re: How to Finish the Program by Herfried

Herfried
Fri Sep 22 16:48:21 CDT 2006

"Martijn Mulder" <i@m> schrieb:
> What method can I call to terminate my Forms-based application and give
> control back to the system?


Call the main form's 'Close' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Re: How to Finish the Program by Lloyd

Lloyd
Sat Sep 23 04:34:07 CDT 2006

Application.Exit()

"Martijn Mulder" <i@m> wrote in message
news:451451a5$0$15076$dbd45001@news.wanadoo.nl...
> What method can I call to terminate my Forms-based application and give
> control back to the system?
>



Application.Exit() by Robbe

Robbe
Fri Oct 06 08:28:28 CDT 2006

Just call this method.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Re: Application.Exit() by Martijn

Martijn
Sat Oct 07 02:50:13 CDT 2006

> Just call this method.


Yes, I have that. From somewhere deep inside the code, in response to a
certain event, I call the static method

System.Windows.Forms.Application.Exit();

to finish the program and return control to the operating system



Re: How to Finish the Program by rsine

rsine
Mon Oct 09 06:12:51 CDT 2006

What is the preferred method for closing a forms based application? Is
it using the forms "Close" method, "Application.Exit", or perhaps the
key word "END"? I am looking for a best practices answer so please
clarify the "why" if you consider one way better than another.

-Thanks


Herfried K. Wagner [MVP] wrote:
> "Martijn Mulder" <i@m> schrieb:
> > What method can I call to terminate my Forms-based application and give
> > control back to the system?
>
>
> Call the main form's 'Close' method.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Re: How to Finish the Program by Martijn

Martijn
Mon Oct 09 13:29:54 CDT 2006

> What is the preferred method for closing a forms based application?


From somewhere deep inside the code, in response to a
certain event, call the static method

System.Windows.Forms.Application.Exit();

to finish the program and return control to the operating system