-
Jun 29th, 2012, 07:25 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] when you shut down windows will this save my work
when i shut down my computer will this save my work on exit
or is there a better way?
thanks
Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Call Savetime
Unload Me
End Sub
-
Jun 29th, 2012, 07:41 AM
#2
Re: when you shut down windows will this save my work
Form_QueryUnload is meant for cancelling the unloading (such as showing a "Are you sure you want to exit?" message), or potentially dealing with particular unloading modes (such as Task Manager is closing your app).
As you aren't doing either of those, you should be using Form_Unload instead.
Note that there is no reason to have Unload Me inside Form_QueryUnload. If you don't cancel via Form_QueryUnload, the form will unload automatically after Form_QueryUnload has been called.
-
Jun 29th, 2012, 11:10 AM
#3
Addicted Member
Re: when you shut down windows will this save my work
I agree with si_the_geek comment, but, Yes, Form_QueryUnload will save your work!
Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Call Savetime
End Sub
But to be shore, replace your function with Beep and test it!
Last edited by beic; Jun 29th, 2012 at 11:11 AM.
Reason: typo
-
Jul 1st, 2012, 01:16 PM
#4
Thread Starter
Fanatic Member
Re: [RESOLVED] when you shut down windows will this save my work
hey yall how do you make a program run something when you hit close button.
-
Jul 1st, 2012, 01:25 PM
#5
Re: [RESOLVED] when you shut down windows will this save my work
If you mean the "X" in the title bar, that is what Form_QueryUnload and Form_Unload are for.
-
Jul 1st, 2012, 01:31 PM
#6
Thread Starter
Fanatic Member
Re: [RESOLVED] when you shut down windows will this save my work
ok cool thanks i think i got it, i put msgbox in there and its working
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
|