View Full Version : interacting with mappoint toolbars

04-29-2009, 03:22 PM
I am using the activeX component in my project and have enabled the "Advanced" ToolBar i.e.

MPCMap.Toolbars.Item("Advanced").Visible = True

Is there a way to capture the end-user inputs and interactions with the toolbar? I'd like to retrieve the text entered into the toolbars search/find location textbox and or the showfinddialog. I'd also like to make the textbox readonly until a certain event is triggered.

04-30-2009, 07:06 AM
The API doesn't let you do this, but you might be able to trap the actual Windows messages. This isn't something I've done myself, but I think Wilfried has some experience with it.

As for disabling: The easiest way is to remove the toolbar - then bring it back when you need it.


05-02-2009, 02:06 AM

I also go for the advice of Richard. Otherwise is write your own toolbar and you have control of all things yourself. Trapping all the forms and windows messages from the control is certaninly not easy and some things could change when version upgrade.

01-21-2011, 05:40 PM
I am trying to figure out how to be notified when someone changes the location of the map (by using the find/search field on the toolbar). I thought I could just wire up the LocationChanged event, but I don't get a message here. Maybe LocationChanged is just a message meaning the location of the control has change, and not anything to do with the MapPoint Location. Is there any way to detect a change in location? If this occurs, my app needs to clear the old pushpins and query for a new set in the new location. Can anyone help me figure out how to capture a change in map location?

Using C#/MapPoint 2010


01-24-2011, 08:52 AM
I don't think you have the right name for that event?

Use the "AfterViewChange" event to detect if the view has changed (ie. location and/or zoom factor).


01-24-2011, 12:22 PM
Thanks! I will have to specifically check for location changes because I don't want to reset all my local settings for simply zooming, but this is just the notification I needed to at least know to a location change might have been made.