473,839 Members | 1,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application.exi t not exiting?


I have some code which needs to do close down the application
and i'm trying to fire it in the catch of a try.

However it doesnt work. The application does not exit!

Any ideas?

Nov 20 '05 #1
2 1883
* "Dan Keeley" <ma********@hot mail.com> scripsit:
I have some code which needs to do close down the application
and i'm trying to fire it in the catch of a try.

However it doesnt work. The application does not exit!

What are you doing in your application? Maybe you should try to close
working threads and processes inside your application, dispose objects
and then "shutdown" the application (if it doesn't exit automatically,
you can use 'Application.Ex itThread').

Herfried K. Wagner [MVP]
Nov 20 '05 #2
What are you doing in your application? Maybe you should try to close
working threads and processes inside your application, dispose objects
and then "shutdown" the application (if it doesn't exit automatically,
you can use 'Application.Ex itThread').

Ah ok, nothing complicated byt that got me thinking. The application.exi t
didnt seem to be running when in the "new" method of the screen just being

So i made it check and exit if necessary before i do application.run ()

Nov 20 '05 #3

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

Similar topics

by: Andrew Warren | last post by:
I'm trying to exit a Windows Forms application while in the form's constructor (after InitializeComponent() has been called) and am finding that calling Application.Exit () still leaves the form displayed and running. Trying to force the form to close with this.Close() does not work either. Any suggestions? Thanks.
by: cj | last post by:
Normally, a dotNET application will throw an exception when something goes wrong, and the exception can be caught easily and reported to the user. However, users have been reporting that our application just simply vanishes without any warning. No exception seems to be thrown, otherwise it would have been caught. It is also seemingly undeterministic, making it really hard for us to find out the cause of the problem. If the application...
by: Dino M. Buljubasic | last post by:
I know this sounds ridiculous but I am having problems when exiting/sighing out of my application. I have two forms, Login and Main. On Main form, I have two buttons, Sign Out and Exit. These two buttons and the close button (X) should ask user to confirm exiting or signing out, then if Yes, they should write log file and then do: - When I click exit, I should close both, main and login form. - when I click Sign out, I should close...
by: tt | last post by:
Hi, ANy ideas on this? When I click the close button of a window in VB.net which method gets called? I used Applicaton.exit in some method of my appln. to exit the application but, it still leaves the process in the process table. Can someone help me exiting an application cleanly. Thanks -tt
by: John Wildes | last post by:
Hello All I have an application that has one form. I start the application using a Application.Run(New frmMain) command in Sub Main(). When I exit, the exit menu Item simply does a Me.Close . It closes and ends the application, and closes the NotifyIcon I have specified for this application. When I use Application.Exit it closes the form and ends the application but the NotifyIcon doesn't remove itself unless you hover a mouse cursor...
by: Peter Oliphant | last post by:
How does one launch multiple forms in an application? Using Photoshop as an example, this application seems to be composed of many 'disjoint' forms. Yet, they all seem somewhat 'active' in contrast to one of them always being 'modal' (e.g., if you are moving over a picture the 'Info' form will update the (x,y) screen location in realtime even if not the selected form. Also note that this example implies the various forms can communicate...
by: hzgt9b | last post by:
I am having a curious problem... When 'Application.Exit()' command is executed in my program it does not end. I set a breakpoint in the 'Dispose' methid that never gets called (yes, I am in Debug mode) - what gives... this is certianly strange bahavior. The code that I am running is below, I added Stop statements to alert me when the applicaiton.exit() fails to quit the app... Anyone have any ideas - I'm stuck!
by: Markus Stoeger | last post by:
Hi, I have a problem with Application.Run() when Windows is shutting down. Please have a look at the copy&paste example program below. The application has no forms. It has only got a notify icon in the system tray and it uses Application.Run() to keep the message loop running. When the user clicks the icon, the application should shut down and exit. So far that works fine.
by: Ant | last post by:
Hi all, I'm putting together a simple help module for my applications, using html files stored in the application directory somewhere. Basically it sets up a basic web server, and then uses the webbrowser module to display it in the users browser. I have it set up to call sys.exit(0) if the url quit.html is called, but for some reason (on Windows XP via the cmd.exe shell) python won't let me have the console back. I get the System Exit...
by: jrpfinch | last post by:
Is the following the most elegant way to exit a multi-threaded application on a Ctrl-C? I am a complete beginner and would have thought there was some way of doing it without having to use while 1: pass, but have yet to find a way. N.B. exit() is a method for cleanly exiting the thread using a queue. Many thanks Jon
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.