Start-stop applications programmatically


This sample shows how to start and stop ArcGIS applications. It obtains a handle to the application by listening for new applications in AppRot's AppAdded event, and releases it in the AppRemoved event.

How to use:
  1. Run the StartStop.exe to start and stop ArcGIS applications.

ArcMap, ArcCatalog, ArcToolbox, ArcScene

Requires: ArcGIS 8.x.

Difficulty: Easy

Visual Basic
File Description
RegObject.cls This class wraps API calls to access the registry.
StartStop.exe The compiled application.
StartStop.frm The application form file.
StartStop.vbp The project file.
SystemErrorMsg.bas SystemErrorMsg() in this module returns the system error message defined in the MessageID argument.

Key CoClasses: Application, AppROT
Key Interfaces: IApplication, IAppROT, IAppROTEvents
Key Members: AppAdded, AppRemoved