PDA

View Full Version : C# Event Handler



Guido Hartig
04-11-2012, 11:08 AM
Hi,

i do some test with this tutorial: BackAndForwardUtility: A Simple .NET Add-in for Microsoft MapPoint - MapPoint Articles - MP2K Magazine (http://www.mp2kmag.com/a156--back.forward.mappoint.html)

is it possible to hook forward and back on a key event?

can u give me a simple sample.

Winwaed
04-12-2012, 06:34 AM
MapPoint does not expose key events, so you would not be able to do it through that. It does expose mouse events, so you could hook it up to the right mouse button (eg. as MPSuperShape does in order to produce a custom pop-up menu). You would need the option to disable it though because MapPoint uses the right mouse button for itself.

You might be able to hook in to lower level Windows events that occur on the MapPoint map window. You would have to investigate this yourself, and it probably wouldn't work on Vista or Windows 7 (you would have to capture the window handle for the map window, then intercept the events). Here Be Dragons.

Guido Hartig
04-12-2012, 06:53 AM
Ok, in other words.

I create an add-in with this tutorial. but the user must click every time "tools -> Button" to activate the procedure.
I want to auto fire the add-in every time he change somethin in mappoint.

please give me a sample (Maybe without forms and activex), i used only the Mappoint Object Libary

thx again