Yes. Example in WinForms:
private Rectangle boundRect;
private Region testRegion;
private Point testPoint;
private bool IsInRect;
private bool IsInRegion;
private void TestHitDetection()
{
boundRect = this.ClientRectangle;
testRegion = new Region(new Rectangle(50,50, 200,200));
testPoint = new Point(100,100);
IsInRect = boundRect.Contains(testPoint);
IsInRegion = testRegion.IsVisible(testPoint);
}
imho the MS names for the hit-detection operators are very poorly named.