Hi Mike,
You can avoid this problem by overriding the forms WndProc and handling the Form''s Activated/Deactived Events. Here is the code snippet
public const int SC_CLOSE = 0xF060;
public const int WM_SYSCOMMAND = 0x0112;
protected override void WndProc(ref System.Windows.Forms.Message m)
{
if(m.Msg == WM_SYSCOMMAND && (int)m.WParam == SC_CLOSE)
{
this.flag = false;
this.Close();
}
base.WndProc(ref m);
}
Here is a
sample
Let me know if this does not help. Can you post a small sample showing this problem or tell us how to see it in the Browser sample/Attached sample
Regards,
Madhan