In this section, we will add an ArcMap button to the project. We will add logic to this button so that if the user clicks on it, it will display a form. This form will be the restaurants viewer form where all restaurants searches are conducted.
We will now add a button to our project; a button in extending ArcObjects is known as a command. To add the command, follow these steps:
If necessary, open Visual Studio Express in administrator mode; we need to do this since our project is actually writing to the registry this time, so it needs administrator permissions. To do that, right-click on Visual Studio and click on Run as administrator.
Go to File, then click on Open Project, browse to the
Bestaurants
project from theC:\ArcGISByExample\bestaurants\Code
, and click on Open.Click on the
Bestaurants
project from the Solution Explorer to activate it.From the Project menu, click on Add Class.
Expand the ArcGIS node and then click on the Extending...