Hi,
Frankly I see no motive why you have to put this, the default WndProc should
have a code similar to yours, are you using threads? or maybe using a modal
dialog box ? I run ICQ from time to time and it does the same thing, when
windows is shutting down it display a message asking if I want to close
before answer the messages, it does prevent windows from shutting down, bad
app design, that's all
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:21**********************************@microsof t.com...
The problem was solved with this ;)
protected override void WndProc(ref Message m)
{
int WM_QUERYENDSESSION = 0x11;
int WM_ENDSESSION = 0x16;
// Carry on with the message.
base.WndProc(ref m);
if (m.Msg == WM_QUERYENDSESSION)
{
m.Result = (IntPtr) 1;
}
else if (m.Msg == WM_ENDSESSION)
{
m.Result = (IntPtr) 0;
this.Close();
}
}
"Vadym Stetsyak" wrote:
You mean that windows app stays in the process list of the task manager,
if
so probably there are not closed/disposed resources in the application.
If you use resources ( e.g. unmanaged ) then in the form's Dispose you
have
to close/dispose them.
If you will give more description about the app you're developing or what
that app is using, the answer can be given much more faster...
--
Vadym Stetsyak aka Vadmyst
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:35**********************************@microsof t.com... > Hi,
> I have a application developed by me in C# that does not let windows
> shut
> down!
>
> What is the problem? is this a Framework bug?
>
> I would like to receive some feedback about this issue