public bool CheckControlPos(Control c, Point pos)
{
// Is this a visible control other than the MainWindow?
// Is the mouse cursor within this control's boundaries?
if (c.Visible && !c.Passive && c != MainWindow &&
pos.X >= c.AbsoluteRect.Left && pos.X <= c.AbsoluteRect.Right &&
pos.Y >= c.AbsoluteRect.Top && pos.Y <= c.AbsoluteRect.Bottom)
{
// Yes, mouse cursor is over this control.
return false;
}
else
{
return true;
}
}