how to destory the application without getting error msg ?

  • Thread starter Thread starter Daylor
  • Start date Start date
D

Daylor

hi.
i want to destroy the application when i catch some exception.
i have multithread app.

how can i destroy the application and exit immedietly ?
 
Daylor said:
hi.
i want to destroy the application when i catch some exception.
i have multithread app.

how can i destroy the application and exit immedietly ?

Application.Exit() ' the opposite of what you do when you start a windows
forms application Application.Run(New Form1())

Yves
 
* "Daylor said:
i want to destroy the application when i catch some exception.
i have multithread app.

how can i destroy the application and exit immedietly ?

Tell the threads, for example by setting a Boolean variable, that they
should terminate, then close the main form.
 
you'll need to know all your threads; send them aborts and then exit your
app. that should take everything down.

Josh Moody
Developer Division Sustained Engineering Team

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
 
Back
Top