|
-
May 10th, 2007, 01:27 PM
#1
Thread Starter
New Member
Closing a window
Okay, I just got started using VB .NET 2003 in a maintenance role and I have to start by fixing the following problem. There is a window in my program that has an exit button. When a user pushes the exit button a procedure is called and "certain things" happen. However, if the user uses the X in the top right corner, or if ALT + F4 is pressed, the procedure is not called which is the problem. How do I tie the exit procedure into the other window closing options?
Thanks...
-
May 10th, 2007, 01:34 PM
#2
Frenzied Member
Re: Closing a window
The form has 2 closing events, FormClosed and FormClosing. Move the code that is in the exit button's event to one of these. Then just call close from the exit button.
-
May 10th, 2007, 07:35 PM
#3
Re: Closing a window
Just note that FormClosing and FormClosed are new in .NET 2.0. In .NET 1.x you would use the Closing and Closed events. Note also that those events will not be raised if you call Application.Exit to quit the app.
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
|