|
-
Apr 17th, 2003, 08:03 AM
#1
Thread Starter
Hyperactive Member
How do i catch an application exit.
I was wondering, how can i catch the event when someone clicks on the little X in the right corner of an application? I need to do some processing and checking right before the application closes i just dont see what to catch to be able to do that.
..::[ kleptos]::..
- Database Administrator (MSSQL 2000)
- Application Developer (C#)
- Web Developer (ASP.NET)

-
Apr 17th, 2003, 09:19 AM
#2
Use the Closing event of the form
Code:
private void YourForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//to cancel closing of the form
//e.Cancel = true;
}
-
Apr 17th, 2003, 10:20 AM
#3
Thread Starter
Hyperactive Member
I must have not had the form active when i clicked the little lightning bolt in VS.NET, thanks again Serge!
..::[ kleptos]::..
- Database Administrator (MSSQL 2000)
- Application Developer (C#)
- Web Developer (ASP.NET)

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|