Whats the best way to check to see if a point exists in a polygon.
my shape is looks like the following
i need to determine if i have clicked within this shapeCode:_____ / | | | | | | | | | \_____|
Whats the best way to check to see if a point exists in a polygon.
my shape is looks like the following
i need to determine if i have clicked within this shapeCode:_____ / | | | | | | | | | \_____|
Last edited by Strider; Jan 25th, 2005 at 10:16 AM.
There are a few threads around that have working solutions, there's a good discussion of a few methods here (including one of mine):
http://www.vbforums.com/showthread.php?t=244049
Depending on how you have your program working so far, there is also the API PtInRegion. There are a few threads about it on this site, a search should give you several examples![]()
(2007, 2008, 2009, 2010, 2011, 2012) . . . . . . . . Hitchhiker's Guide to Getting Help at VBForums
Classic VB FAQs (updated Oct 2010) ...Database Development FAQs/Tutorials (updated May 2011)
(includes fixing common VB errors) .......... (includes fixing common DB related errors, and [Classic VB] ADO tutorial /further steps, and [VB.Net] ADO.Net Tutorial).
Tutorial: How to automate Excel from VB6 (or VB5/VBA) .. SQL 'Select' statement formatter/checker .. Convert colour number to colour name .. FlexGrid: fill from recordset .. FlexGrid: AutoSize columns .. DB Reserved Words checker
Connection strings .. MDAC/Jet/ACE downloads .. SQL Server downloads .. MZTools (free upgrade for the VB6/VBA Editor)
Here is all the code you need. It's much faster than PtInRegion and it doesn't require the API....Originally Posted by Strider
http://support.microsoft.com/kb/q121960/
I don't live here any more.