maxmanzero
Member
- Joined
- Sep 29, 2004
- Messages
- 12
- Programming Experience
- Beginner
Below is the code I am using in the overridden form's wndProc to capture a QueryEndSession message.
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Select Case m.Msg
Case 17
KillWatchDog()
Application.Exit()
End Select
MyBase.WndProc(m)
End Sub
I am capturing this message so that I can disable a hardware timer my program is communicating with. The problem is when I tell Windows to shutdown my program disables the timer and closes just like it should, but windows doesn't shutdown. I have to select Shutdown or Restart again for the message to go through. Am I missing a pass through or something.
VS.NET 2003, Windows 2kPro
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Select Case m.Msg
Case 17
KillWatchDog()
Application.Exit()
End Select
MyBase.WndProc(m)
End Sub
I am capturing this message so that I can disable a hardware timer my program is communicating with. The problem is when I tell Windows to shutdown my program disables the timer and closes just like it should, but windows doesn't shutdown. I have to select Shutdown or Restart again for the message to go through. Am I missing a pass through or something.
VS.NET 2003, Windows 2kPro