Hello,
I wrote a GUI app in Jython (using Java Swing) which uses database. The application remains connected for its whole run time until the main window is closed (JFrame, using defaultCloseOpe ration = JFrame.EXIT_ON_ CLOSE).
Now, when exiting, I would like to make sure I explicitly close the database connection. Is there any function, like _atexit() in C, where I could place my code?
Thank you very much.
Search Result
Collapse
5 results in 0.0044 seconds.
Keywords
Members
Tags
-
cleanup actions on sys.exit()
-
Exit Application from Switchboard
I am using a Switchboard that contains an 'Exit Application' button. The code that the Switchboard uses for exiting the application is:
' Exit the application.
Code:Case conCmdExitApplication CloseCurrentDatabase
-
How to Shut-down a Silverlight Application
Hello team,
I'm building a GIS Silverlight 4 application. I need to shut down the whole thing after a save event has taken place.
So..
1. User saves a new graphic to the SDE database,
2. Messagebox shows success or fail..
3. User clicks OK
3. Application and browser shuts down..
Has anyone got some code for me on how to do this please?
Many Thanks,
... -
closing both forms
im trying to open one form while closing another form with a link label.
what im using is this:
private void linkLabel1_Link Clicked(object sender, LinkLabelLinkCl ickedEventArgs e)
{
Form2 frm = new Form2();
frm.Show();
this.close();
}
but it closes both forms and exiting the debug
plz help me! T_T -
Closing a form
I'm running an application that has several subsequent forms. I'd like to be able to close the individual form without closing the app. I've included my code and would appreciate any help.
If RUS_Exit("Form Exit") Then
Me.Close()
Else
e.Cancel = True