View Single Post

  #1 (permalink)  
Old 05-12-2004
Anonymous Anonymous is offline
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Answer: How to show mappoint toolbars with C#

I've spent a lot of time google searching for this answer without any luck (even browsing past messages here), but I finally figured out how to do it.

assuming axMappointControl is your control, and you want to show the navigation bar, then use this code:

Code:
object barObj = "navigation";
this.axMappointControl.Toolbars.get_Item(ref barObj).Visible = true;
this works for the Standard, Navigation, Drawing, and Location and Scale toolbars.

the idea of using get_Item comes from here:
http://mp2kmag.com/a103--chandu.thot....mappoint.html

What I don't understand is the get_Item function doesn't even show up in the class... no wonder something like this can be fustrating... when there are hidden class functions!

Surprisingly, as far as my google searching skills are concerned, I am the first person to have figured this out. I hope my google searching skills are just bad, rather than have this dubious honor. Can support for mappoint in C# be this bad?

I thought C# was a first class language in the eyes of Microsoft. I would prefer if Microsoft would not support MapPoint for C# at all, rather than giving me the impression that, since there exists a component for C#, and it's a Microsoft product, it must be fully functional. If there was no component in C#, then I'd have learn VB instead. I resist learning VB because I come from a C++ background and like the familiarity.

The things I learn through trial and error. Sorry if this sounds like a rant... it's just that I've spent a lot of time trying to figure this out.

[/code]
Reply With Quote