|
-
Jan 7th, 2007, 02:01 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Form Closing event
I read about this Form.Closing event from MSDN. So I created 2 forms, 1 parent and one MDI child. In the child form, I tried to create the following routine, but 'Closing' is not even an option in MyBase! What is the problem?!
Thanks!
VB Code:
Private Sub Form2_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
End Sub 'Form1_Closing
-
Jan 7th, 2007, 03:37 AM
#2
Re: Form Closing event
If you're using VB 2005 then you should use the FormClosing event. The Closing event is obsolete in .NET 2.0, which is why it doesn't show up in Intellisense. You shouldn't be typing event handlers directly anyway. You should sue the drop-down lists at the top of the code window or else use the Properties window to generate event handler signatures. Can you please specify your version when posting in future?
-
Jan 7th, 2007, 03:37 AM
#3
Thread Starter
Addicted Member
Re: Form Closing event
Solved. My version of the VB.NET is FormClosing
-
Jan 7th, 2007, 03:40 AM
#4
Thread Starter
Addicted Member
Re: Form Closing event
Thanks JIM. You are right. I am using 2005.
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
|