Hi man,
in each form:
protected override void WndProc(ref Message m)
{
//Exit Message Code
int WM_QUERYENDSESSION = 0x11;
//Cancel Message Code
int WM_CANCELMODE = 0x1F;
// if the message is to shut down/reset window
if (m.Msg == WM_QUERYENDSESSION)
{
base.WndProc(ref m);
//You can also cancel the exit window message by using
//the following lines
//Message MyMessage = new Message();
//MyMessage.Msg = Convert.ToInt32(WM_CANCELMODE);
//base.WndProc(ref MyMessage);
}
else
{
//carry on with the message
base.WndProc(ref m);
}
}
hope that helps.
"Just close your eyes and see"
<Ju*********************@discussions.microsoft.com > wrote in message
news:02**********************************@microsof t.com...
Kindly i want to know how to use window proc from within C# Application
is there any tutorial or somebody can help me in doing this