Community of VE/MapPoint Users and Developers
This is a discussion on ensure pushpin is visible within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi everyone, When I add or move a pushpin, is there any way to tell if it's in the visible ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
|
Hope this will get you going in the right direction (ok, its a pun) I'm just counting the number of pushpins visible but you could use this to test the pushpin names compared to the name of the pushpin you just added. Code: 'Query number of pushpins visible on screen Dim objmap As MapPointctl.Map Set objmap = MappointControl1.ActiveMap Dim objDataSet As MapPointctl.DataSet Dim objRecords As MapPointctl.Recordset Dim objLocs(1 To 5) As MapPointctl.Location Set objLocs(1) = objmap.XYToLocation(objmap.Left, objmap.Top) Set objLocs(2) = objmap.XYToLocation(objmap.Width, objmap.Top) Set objLocs(3) = objmap.XYToLocation(objmap.Width, objmap.Height) Set objLocs(4) = objmap.XYToLocation(objmap.Left, objmap.Height) Set objLocs(5) = objmap.XYToLocation(objmap.Left, objmap.Top) lngCount = 0 For Each objDataSet In objmap.DataSets Set objRecords = objDataSet.QueryPolygon(objLocs) objRecords.MoveFirst Do While Not objRecords.EOF lngCount = lngCount + 1 objRecords.MoveNext Loop Next MsgBox "Number of records in polygon: " & lngCount
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
![]() |
| Tags |
| ensure, pushpin, visible |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| having the driver always be visible | BobFromBoston | MapPoint 2006/2009 Discussion | 2 | 07-31-2005 01:51 PM |
| How to tell if an objects location is visible? | Anonymous | MapPoint 2006/2009 Discussion | 2 | 06-28-2004 09:15 AM |
| Finding Pushpin Name by clicking on the Pushpin?(MP 2002) | NickSP | MapPoint 2006/2009 Discussion | 4 | 01-10-2003 01:11 PM |