473,387 Members | 1,497 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,387 software developers and data experts.

how do I exit a form ??

I need to force a exit if a critical file is not found???
Nov 21 '05 #1
3 13701
Program exit:

Application.Exit

Form close

theForm.Close :)

"Simon" <Si***@microsoftforums.com> wrote in message
news:Or**************@TK2MSFTNGP14.phx.gbl...
I need to force a exit if a critical file is not found???

Nov 21 '05 #2
Simon schrieb:
I need to force a exit if a critical file is not found???


To close a form, call it's close method. To exit an appliation, exit all
threads. To exit a thread, exit all procedures in reverse order. To exit a
UI thread, close the form passed to Application.Run or the one set as the
"startup object" in the project properties. To exit Application.Run without
arguments, call application.exitthread.

Armin
Nov 21 '05 #3
Simon,
I need to force a exit if a critical file is not found???

me.close

Cor
Nov 21 '05 #4

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

Similar topics

7
by: deko | last post by:
I have a function with a number of long loops. While the function is running, I want to be able to click a Stop button and exit the function as quickly as possible. The abbreviated code looks...
1
by: Brendan Miller | last post by:
I am trying to close my application using Application.exit() in the frmMain_Closing event. When the form closes the process does not. My application only has one form (no other classes either). ...
6
by: orekin | last post by:
Hi There I have been trying to come to grips with Application.Run(), Application.Exit() and the Message Pump and I would really appreciate some feedback on the following questions .. There are...
4
by: Bob Day | last post by:
Using VS 2003, VB.net... I am confused about the Application.Exit method, where the help states "This method does not force the application to exit." Aside from the naming confusion, how do I...
22
by: Shelby | last post by:
Hi, I used System.Windows.Forms.Application.DoEvents() in a loop to handle user click close button . Private Sub btnclose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)...
1
by: Peter Oliphant | last post by:
I have a C++ Console application being written using VS C++.NET 2005 Express. It never crashes and seems to be working just fine. However, when I close the application via the Console 'X' exit...
12
by: Pete Smith | last post by:
Which is the appropriate one to use in the above choice? VB.Net. .Net Framework 1.1 Thank you, Pete
4
by: JIM.H. | last post by:
Here is the code I am having problem: static void Main(string args) { bool isPar = false; if ((args.Length == 1)) { if ((args(0).ToUpper() == "MYPAR")) { isPar = true;
2
by: Matuag | last post by:
Hi All, I want to create following command buttons on a Form which users can edit. Save ( Save Changes made) Cancel ( Undo data changes) Exit ( Close form) I am using Macros for each of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.