Prevent right-click or hide items in legend

3 views
Skip to first unread message

Joshua B. Helm

unread,
Jan 15, 2002, 3:37:50 PM1/15/02
to
We're developing a module for our application suite that uses the MapPoint
2002 ActiveX control 9.0. I'd like to display the overview image and legend
items for the user, but I don't want to allow them to use the built-in
pushpin management functionality they can access from the Pushpins sections
by right-clicking. I'd either like to replace the popup menu with our own,
or remove (hide) the Pushpins section all together.

The BeforeClick event only seems to fire for the map area itself and not in
the legend area. Is there any way to trap these clicks or to hide the
Pushpins section?

Thanks...

---
- Joshua B. Helm
Technology Manager
Millbrook Incorporated


Walt Cygan

unread,
Jan 15, 2002, 4:30:23 PM1/15/02
to
Check out the PaneState property of the control. You can set this to
"geoPaneNone" to suppress display of the legend.

Also, You cannot create your own popup meny on right-click.

Walt

"Joshua B. Helm" <jh...@millbrookinc.com> wrote in message
news:#$fMCSgnBHA.1516@tkmsftngp07...

Chris Gebhardt

unread,
Jan 21, 2002, 11:47:21 AM1/21/02
to
You can replace the default MapPoint right click menu with code:

Private Sub MPC1_BeforeClick(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long, Cancel As Boolean)
If Button = 2 Then PopupMenu mnuTest1
End Sub

where mnuTest1 is your own menu. This example is for MP2k2.

Yes, you can hide the legend through the PaneState property, but that also takes away your overview map. To get around this, I
would add two instances of the MPC to the form. If the user clicks on the smaller overview MPC, it would update the larger MPC.
Tedious, but it accomplishes exactly what you want...

///Chris\\\
Chris Gebhardt, Microsoft MVP
Crime Analysis Associates
www.CrimeAnalysis.net
ch...@crimeanalysis.net


"Joshua B. Helm" <jh...@millbrookinc.com> wrote in message news:#$fMCSgnBHA.1516@tkmsftngp07...

Chris Jensen

unread,
Jan 22, 2002, 10:22:43 AM1/22/02
to
Walt & Chris,

Great answers. Thanks for helping the community.
Regards,
Chris Jensen

This posting is provided “AS IS” with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
<http://www.microsoft.com/security>.

Reply all
Reply to author
Forward
0 new messages