protected override bool HandleLButtonDown(ref Message m)
{
int x = Control.LowOrder((int)m.LParam.ToInt32());
int y = Control.HighOrder((int)m.LParam.ToInt32());
// Correct y since we are in NC land.
NCClientToNC(ref x, ref y);
if (IconRectangleContains(x, y))
{
if ((DateTime.Now - icon_clicked_time).TotalMilliseconds <= SystemInformation.DoubleClickTime)
{
if (icon_popup_menu != null && icon_popup_menu.Wnd != null)
{
icon_popup_menu.Wnd.Hide();
}
form.Close();
return(true);
}
else if (form.Capture)
{
icon_dont_show_popup = true;
}
}
return(base.HandleLButtonDown(ref m));
}