Hello to all, I would like to known if there is any event that happens when windows shutdown.
I want to make a resident application that detects when windows shutdown, and, when this occurs, make several things.
Printable View
Hello to all, I would like to known if there is any event that happens when windows shutdown.
I want to make a resident application that detects when windows shutdown, and, when this occurs, make several things.
When Windows shuts down, it will close your application. You can detect this in the QueryUnload event.
Code:Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppWindows Then Msgbox "Windows is shutting down"
End Sub