I am writing a project in vb2010 in which i want to add a package having 4 toolbars with about 48 tools in them in ArcMap 10.0. So far, I have created an ArcMap class project with the common functions in it. I have created windows forms and referenced this function class to it. I ahve also created a ArcMap add-in in which i have created a tolbar and a button.

Now, I want to add this form as a tool in the toolbar on clicking on the button in the add-in.

  1. Is there any other method to achieve the same?
  2. How to add the windows form as a tool in ArcMap Toolbar add-in?

I assume you can add a tool. If you don't know this process go here.

In your tool's class you will need a global variable that holds a reference to your form. In your tool's OnActivate you will create the form (if it doesn't exists) and run the Show method. In your tool's OnDeactivate you will run the Hide method.

That's about as easy as it gets.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.