Book Image

ArcGIS By Example

By : Hussein Nasser
Book Image

ArcGIS By Example

By: Hussein Nasser

Overview of this book

Table of Contents (17 chapters)
ArcGIS By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding the restaurants viewer button


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.

Adding the button

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:

  1. 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.

  2. Go to File, then click on Open Project, browse to the Bestaurants project from the C:\ArcGISByExample\bestaurants\Code, and click on Open.

  3. Click on the Bestaurants project from the Solution Explorer to activate it.

  4. From the Project menu, click on Add Class.

  5. Expand the ArcGIS node and then click on the Extending...