D
dkisting
Hello,
I am overriding the WndProc in my main form of a Windows application
and the design is for it to ask for some info, kill the application,
and continue on to either shutdown or restart. This is working fine
for the go into hibernation or standby mode, however with shutdown, it
stops after receiving the advice and killing itself. Here is my code:
if (m.Msg == WM_SHUTDOWN)
{
m.Msg = WM_SHUTDOWN;
m.Result = (IntPtr) 1;
KillAgentWithStatusChange(); //this asks for information and than
kills the application
base.WndProc(ref m);
return;
}
The reason I am killing the application is because Windows (for some
reason) won't shut down with the application running. Even after
removing this code, it still does not do the trick. What in the
application could cause Windows not to shutdown when prompted?
Many thanks in advance!
Dan Kisting
I am overriding the WndProc in my main form of a Windows application
and the design is for it to ask for some info, kill the application,
and continue on to either shutdown or restart. This is working fine
for the go into hibernation or standby mode, however with shutdown, it
stops after receiving the advice and killing itself. Here is my code:
if (m.Msg == WM_SHUTDOWN)
{
m.Msg = WM_SHUTDOWN;
m.Result = (IntPtr) 1;
KillAgentWithStatusChange(); //this asks for information and than
kills the application
base.WndProc(ref m);
return;
}
The reason I am killing the application is because Windows (for some
reason) won't shut down with the application running. Even after
removing this code, it still does not do the trick. What in the
application could cause Windows not to shutdown when prompted?
Many thanks in advance!
Dan Kisting