Samples

Identify Commands

Description:

This sample provides a set of sample Identify tools that can be used in conjunction with the MapControl, PageLayoutControl and ToolbarControl. The sample assumes previous experience in creating custom Tools and Commands.

  • Identify Tool: An IPoint object is used in the OnMouseDown event to search all the layers in the FocusMap that are visible and searchable. The IIdentify2::Identify method is used to return an IArray of IFeatureIdentifyObj. The field and value results of each identified feature are displayed using a tree view control and a flex grid control.
  • HTML Identify Tool: An IPoint object is used in the OnMouseDown event to search all the layers in the FocusMap that are visible and searchable. The IIdentify2::Identify method is used to return an IArray of IFeatureIdentifyObj. The field and value results of each identified feature are displayed using a web browser control. The style sheet 'Style.xsl' is used to format the results.
  • Tab Identify Tool: An IPoint object is used in the OnMouseDown event to search all the layers in the FocusMap that are visible and searchable. The IIdentify2::Identify method is used to return an IArray of IFeatureIdentifyObj. The field and value results of each identified feature are displayed using a tab control and a tree view control.
  • Products:

    Engine: VB6

    Platforms: Windows

    Minimum ArcGIS Release: 9.0

    How to use:
    [VB6]
    1. Register the Identify.dll. (Note the Microsoft Flex Grid Control (msflxgrd.ocx), Microsoft Internet Control (shdocvw.dll), Microsoft Windows Common Controls (mscomctl.ocx) and the Microsoft Scripting Runtime (scrrun.dll) are used in this sample).
    2. Either add the Command's to the ToolbarControl (this can be done programmatically by referencing the commands and using the IToolbarControl::AddItem method or this can be done manually using the Customize dialog available through the property pages).
    3. Or use the Command's directly with the MapControl or PageLayoutControl (this can be done by referencing the commands, creating a new instance of a command and passing the MapControl or PageLayoutControl to its OnCreate event).

    VB6
    File Description
    Identify.dll Application extension.
    clsIdentify.cls VB Class Module for the Identify sample command.
    clsIdentifyHTML.cls VB Class Module for the HTML Identify sample command.
    clsIdentifyTab.cls VB Class Module for the Tab Identify sample command.
    frmIdentify.frm VB Form for the Identify sample command.
    frmIdentifyHTML.frm VB Form for the HTML Identify sample command.
    frmIdentifyTabs.frm VB Form for the Tab Identify sample command.
    ctlSplitter.ctl User Control for the Identify sample command.
    Style.xsl Style sheet for the HTML Identify sample command.
    logo.bmp Style sheet for the HTML Identify sample command.
    Utilities.bas Module containing common functions used by the Identify sample commands.
    Identify.res Resource file containing custom bitmaps and cursors.
    Identify.vbp VB Project file.


    Key Libraries: Carto, ControlCommands, Display, GeoDatabase, Geometry, System, SystemUI
    Key CoClasses:HookHelper
    Key Interfaces: IActiveView, ICommand, IFeature, IFeatureIdentifyObj, IIdentify2, IMap, IRowIdentifyObj, ITool
    Key Members:FocusMap, HitTestMap


    Feedback Send feedback on this sample