Here i am again with a query again. Let me explain the project layout first. 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 a 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?

Thanking you for help in advance.


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.

Good Luck

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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