.
GDI+ FAQ
Skip Navigation Links

What is Hit Testing?

Many graphics programs are interactive. You may wish to detect the position of the mouse and see if it coincides with a specific thing that you've drawn on screen. Most commonly this will be accomplished by using the Rectangle or RectangleF Contains method to see if an area contains a point. Less often, this will involve more complex methods like detecting if the mouse is in a shape that is non-rectangular. This can be accomplished by hit-testing in a Region object

Return to the article.

Sponsored By
DaraizeTechnologies.com

&
Proteus Groupe

Bob Powell

Create your badge

Copyright © Bob Powell 2000-2012.  All rights reserved.