|
-
Apr 25th, 2002, 09:31 AM
#1
Thread Starter
Addicted Member
Finding out if Windows is shutting down
is there anyway to find out if windows is shutting down and get some code to run. I'm having a few problems with temp internet files so I need these deleting when windows is shutting down. It will be running on an app that will already be loaded. Any ideas?
-
Apr 25th, 2002, 10:11 AM
#2
That sound really complicated (if at all possible). You'd probably need to do lots of hooking into the system, which is a complete nightmare!
it would be much easier to just have a program that does it on startup instead...
-
Apr 25th, 2002, 10:35 AM
#3
Thread Starter
Addicted Member
the problem with having it at startup is i wouldnt be able to log in, because the roaming profiles are refusing to load due to corrupt temp internet files.
Its win2k btw so for_unloadquery wotsit dosnt work in my app for some reason tho it does work in a new app.
-
Apr 25th, 2002, 10:41 AM
#4
Not hard at all.
VB Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppWindows Then
'Windows is shutting down!
End If
End Sub
UnloadMode tells us why the program is shutting down. If you set cancel to true you can even keep earlier versions of windows from shutting down.
-
Apr 26th, 2002, 03:10 AM
#5
Thread Starter
Addicted Member
For some reason i cant get this to work with win2k (read earlier post) any ideas?
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
|