Jesper,
Are you exiting whatever event handler you are in after you make the
call? If you are on the UI thread and make the call, then you should return
from your method and then let the main message loop process the WM_QUIT
message (which is what is sent to your app when you call the Quit method).
If you keep performing processing, then the loop has to wait until your
processing is done to process the event.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Jesper Denmark" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
Hi,
After a given exception I would like to terminate the
program. I've been told that Application.Exit() should do
the trick, but I cant seem to make it work at all. It
compiles fine. But it doesn't seem to do anything - the
program just continues after calling the function. Should
it be in a certain scope or called via the object that
was given as an argument to Application.Run?
Please help.
Jesper.