Community of VE/MapPoint Users and Developers
This is a discussion on Finding Pushpin Name by clicking on the Pushpin?(MP 2002) within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I am a relatively beginner programmer and would certainly appreciate your help with my problem. I am adding with ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Finding Pushpin Name by clicking on the Pushpin?(MP 2002) I am a relatively beginner programmer and would certainly appreciate your help with my problem. I am adding with the help of a Recordset from an Access database to Mapoint and adding pushpins with names as IDs that I get from the Recordset from Access. So far so good. What I want to know is can I select the ID or the pushpin name of each individually clicked pushpin? I am doing this in VB6 Thanks. Nick. |
| ||||
|
Nick, You could put this in a command button. Code: Dim objmap As MapPointctl.Map
Dim objPushpin As MapPointCtl.Pushpin
Set objmap = MapPointControl1.ActiveMap
'Make sure the item selected on the map is a pushpin
If TypeOf objmap.Selection Is Pushpin Then
Set objPushpin = MapPointControl1.Selection
'Do Something
msgbox objpushpin.name
End If
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
| |||
|
If this is going to be used by other people, you also want to trap the case where there is no selection. If you don't do that, the program will error when you try to ask the typeof nothing. Try this: Code: Dim objmap As MapPointctl.Map
Dim objPushpin As MapPointCtl.Pushpin
Set objmap = MapPointControl1.ActiveMap
'Make sure the item selected on the map is a pushpin
If Not objmap.Selection is nothing Then
If TypeOf objmap.Selection Is Pushpin Then
Set objPushpin = MapPointControl1.Selection
'Do Something
msgbox objpushpin.name
End If
End If
|
![]() |
| Tags |
| 2002, clicking, finding, pushpin, pushpinmp |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Get PushPin | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-03-2005 11:16 AM |
| automate clicking action | zauber | MapPoint 2006/2009 Discussion | 0 | 07-10-2004 05:23 AM |
| Discuss news by clicking New Topic | Eric Frost | MapPoint 2006/2009 Discussion | 1 | 06-15-2003 09:29 PM |
| finding a pushpin from a .dll | blackmap | MapPoint 2006/2009 Discussion | 1 | 01-10-2003 03:11 PM |
| pushpin | Anonymous | MapPoint 2006/2009 Discussion | 1 | 08-30-2002 09:41 AM |