|
-
Jun 3rd, 2004, 11:23 AM
#1
Thread Starter
New Member
Save before close?
I've created a save function that checks to see if changes have been made when you select exit from the menu. My only problem is that I'm really new to VB and I'm not sure how to use this function with the toolbar close (X) as well. If anyone could help me out I'd appreciate it. Thanks for your time.
-
Jun 3rd, 2004, 12:53 PM
#2
Addicted Member
Call the Save function from the form's Closing event.
-
Jun 3rd, 2004, 02:20 PM
#3
Thread Starter
New Member
Since I'm a noob, how do I declare the closing event?
-
Jun 3rd, 2004, 09:31 PM
#4
Member
Code:
Private Sub form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
<your code here>
End Sub
That should do it
-
Jun 4th, 2004, 02:49 AM
#5
Don't worry you don't have to remember all that.
Go to the form designer, double click the form area and then when the code comes up, use the right-hand-side combobox to select the closing event, then the code in inserted for you.
I don't live here any more.
-
Jun 4th, 2004, 05:10 AM
#6
Thread Starter
New Member
Thankyou for your help. It's appreciated.
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
|