Override WndProc is stopping shutdown
- From: dkisting@xxxxxxxxxxxxxx
- Date: 14 Mar 2006 06:25:30 -0800
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
.
- Follow-Ups:
- Re: Override WndProc is stopping shutdown
- From: Herfried K. Wagner [MVP]
- Re: Override WndProc is stopping shutdown
- From: Mehdi
- Re: Override WndProc is stopping shutdown
- Prev by Date: DrawToBitmap problem
- Next by Date: Re: Text Box Manipulation
- Previous by thread: DrawToBitmap problem
- Next by thread: Re: Override WndProc is stopping shutdown
- Index(es):
Relevant Pages
|