Calling a tool from Windows Form

Discussion created by scirocco on Dec 21, 2010
Latest reply on Jan 3, 2011 by vtammineni
This might look like an easy question, but I have basically crawled through the entire forum and ArcObjects API, unable to find a solution. The only good example I have found was [url=]Use Custom Tool on Windows Form Snippet[/url], but that works with COM-objects, not Add-ins.

I have created an add-in with a toolbar and a button that activates a Windows Form. Inside the Form I have a button, that when triggered, enables users to draw a polygon inside the map (at least, that is the idea). The draw polygon functionality is a tool that is stored in the same add-in, but not shown on the toolbar, and its functionality is triggered via OnMouseDown event.

Now, how do I call this tool from the Forms buttons click event? The draw polygon functionality can't be triggered right away, but must wait for another click event, so that the user is able to place the polygon right where he wants.