|
-
Aug 7th, 2000, 02:22 PM
#1
Hi,
I need to intercept the windows Shutdown event and Cancel it depending on the user input.
I have tried using the AbortSystemShutdown API but its not working. I have tried setting the lpMachineName variable to my machine name (AbortSystemShutdown "abc").
I am using Windows 2000.
Thanks in advance.
I am trying the following code :
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppWindows Then
ans = MsgBox("Are you sure you want to shutdonw the computer ?", vbYesNoCancel)
If ans = vbYes Then
AbortSystemShutdown ""
End If
End If
End Sub
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
|