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

Real-time search and filtering


After adding the textbox right on the toolbar, it will make it easier for us to search for restaurants. Let us code this control:

  1. If necessary, open Visual Studio Express in administrator mode.

  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. We need the txtSearchform control to have access to ArcMap application. For that, we need to add an Application property and then set it. Right-click on txtSearchForm.vb and select View Code.

  4. Add the following property to the code:

    Public Class txtSearchform
    
        Private _application As ESRI.ArcGIS.Framework.IApplication
        Public Property ArcMapApplication() As ESRI.ArcGIS.Framework.IApplication
            Get
                Return _application
            End Get
            Set(ByVal value As ESRI.ArcGIS.Framework.IApplication)
                _application= value
            End Set
        End Property
    End Class
  5. Double-click on cmSearch.vb to view the code...