public Control GetChildAtPoint (Point pt, GetChildAtPointSkip skipValue)
{
// Microsoft's version of this function doesn't seem to work, so I can't check
// if we only consider children or also grandchildren, etc.
// I'm gonna say 'children only'
foreach (Control child in Controls)
{
if ((skipValue & GetChildAtPointSkip.Disabled) == GetChildAtPointSkip.Disabled && !child.Enabled)
continue;
else if ((skipValue & GetChildAtPointSkip.Invisible) == GetChildAtPointSkip.Invisible && !child.Visible)
continue;
else if ((skipValue & GetChildAtPointSkip.Transparent) == GetChildAtPointSkip.Transparent && child.BackColor.A == 0x0)
continue;
else if (child.Bounds.Contains (pt))
return child;
}
return null;
}