Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exit an application properly

Usually, I will just use Environment.Exit(code) to exit an application. (Usually through a button click.) But I would like to know is it the proper way to exit, ie, releasing memory etc etc...

like image 747
ghostdog74 Avatar asked Nov 25 '10 10:11

ghostdog74


People also ask

How do you exit an application in Visual Basic?

Just Close() all active/existing forms and the application should exit. ok.

Which of the following method is used to close the Windows form application * This exit (); Form exit (); application exit (); application Terminate ();?

The Exit method stops all running message loops on all threads and closes all windows of the application.

How do you close a process in VB net?

Furthermore, you could use Process. Kill Method to stop the associated process. The code snippet is as follow.


1 Answers

Just Close() all active/existing forms and the application should exit.

like image 85
Mario Avatar answered Sep 26 '22 01:09

Mario