473,324 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

quitting a C# app

Can someone please tell me the function for unconditionally terminating
an application for non-recoverable errors? In C++ I'd use exit(0).

Thanks.
Nov 16 '05 #1
4 1440
Application.Exit();
"Dave Cullen" <no*****@mail.com> wrote in message
news:40***************@mail.com...
Can someone please tell me the function for unconditionally terminating
an application for non-recoverable errors? In C++ I'd use exit(0).

Thanks.

Nov 16 '05 #2
Some other notable methods
- System.Environment.Exit()
- System.Diagnostics.Process.GetCurrentProcess().Kil l()

--
Jared Parsons [MSFT]
ja******@online.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"

"ilPostino" <ne**@ip80.com> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
Application.Exit();
"Dave Cullen" <no*****@mail.com> wrote in message
news:40***************@mail.com...
Can someone please tell me the function for unconditionally terminating
an application for non-recoverable errors? In C++ I'd use exit(0).

Thanks.


Nov 16 '05 #3
Environment.Exit(exitcode) in a non-GUI app.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
Nov 16 '05 #4
Environment.Exit(exitcode) in a non-GUI app.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: The Roys | last post by:
Hi Im doing something wrong in quitting the Word.Application in my VB program. I have General Declarations Dim AppWord As Word.Application Form_Load() Set AppWord =...
1
by: BadOmen | last post by:
I am using the GetActiveWindow() API but it returns 0 I have a remote that I activate this code with: Code: WinAmpHandler = GetActiveWindow WinAMPhWnd = FindWindow("Winamp v1.x",...
1
by: Gitte Wange | last post by:
Hello, I'm trying to create an application that needs a Timer() to do various checks. My class has a self.timer = Timer(900, self.sendDNSRequest) The timer itself works fine but whenever I try...
0
by: Deaconess | last post by:
I am quitting this group - ever since I joined I have been at least 15 Microsoft viruses a day if not more. Good luck to you all. Back to Yahoo
7
by: Mike | last post by:
Please help. I am using object.quit in an attempt to quit an excel application that I started with createobject ("Excel.Application"). The code executes, but does not stop the application. When...
0
by: jwright | last post by:
I'm using Sapient's Buildit script (cited in an MS Patterns & Practices doc on team development) and I have run into instaces where the solution.DTE.QUIT(); does not appear to work. This occurs when...
8
by: bearophileHUGS | last post by:
Hello, I have four things to ask or to suggest, sorry if they seem basic or already discussed. ------------------- I am still ignorant about Tkinter. This little program, after pressing the...
2
by: Tony Ciconte | last post by:
We have developed an Acc97 application and distribute it using the Wise installation system and SageKey scripts. The installations are rock solid and the product works well on all types of systems....
4
by: Chris | last post by:
Hi, I'm puzzled by some strange behavior when my Python/Tkinter application quits (on linux): the terminal from which I started Python is messed up. If start up python, then import the code...
1
by: subratamaji | last post by:
Hi, I am trying to open the form from the project explorer( Visual basic 6.0 ) by double clicking on a particular form ( frmDispatchEntry ) I am getting the :- RUN-TIME ERROR 50001...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.