In this topic
About using the LicenseControl
The LicenseControl initializes an application with a suitable license or licenses so it can run successfully on any machines it is deployed to. The LicenseControl configures licenses at application start time when the form or dialog box containing the LicenseControl is loaded. Use the LicenseControl to automatically perform license initialization in simple graphical user interface (GUI) applications using the MapControl, PageLayoutControl, GlobeControl, SceneControl, TOCControl, ToolbarControl, or SymbologyControl.
If greater control is required over license initialization, particularly when checking out and checking in extension licenses (the LicenseControl checks out extension licenses for the duration of an application's life), use the AoInitialize object in the System library to programmatically perform license initialization.
The LicenseControl is visible in a visual design environment but is invisible at run time; therefore, unlike the other controls, the LicenseControl does not provide any user interface in an application. In design time, the LicenseControl property pages must be used to configure the application with product and extension licenses. The LicenseControl is only available with the Component Object Model (COM) ActiveX Control and .NET Windows Control application programming interfaces (APIs).
Loading an ArcGIS runtime
Stand-alone ArcGIS applications must locate the appropriate ArcGIS product installation before any ArcObjects code (including license initialization) is called. The APIs used to bind to the appropriate ArcGIS runtime is in the ESRI.ArcGIS.RuntimeManager class in the ESRI.ArcGIS.Version namespace. Runtime binding code should be added to the application's entry point.
Properties dialog box descriptions
The following describes each area on the Properties dialog box:
![](bitmaps/a1111c75-7185-4a5a-bb86-aab0abd6d7151.png)
- Products - Select at least one product license the application can be initialized with. By default, the LicenseControl tries to initialize the application with the ArcGIS Engine product license. If the product you require is not licensed, you may optionally initialize the application with a higher product license. For example, if you select the ArcGIS Engine license and the ArcGIS for Desktop Basic license, the LicenseControl tries to initialize the application with an ArcGIS Engine license (the lower-level license). If that license is not available, the LicenseControl tries to initialize the application with an ArcGIS for Desktop Basic license (the next higher-level license selected). If no product licenses are available, the application fails to initialize. Once an application is initialized with a product license, it is not possible to reinitialize the application for the duration of the application's life.
- Extensions - Select the extension licenses required by the application. Not every extension license is available with every product license, so the list of available extension licenses changes as different product licenses become selected. If the ArcGIS Engine product license is selected and an ArcGIS for Desktop product is selected, only the ArcGIS Engine extension licenses are displayed. The availability of each extension license is checked in conjunction with the product license that the application will ultimately be initialized with. If any of the selected extensions are not available, the application fails to initialize. The LicenseControl checks out extensions directly after the application is initialized and checks in extensions when the application is shut down.
If a GlobeControl or SceneControl (requiring the 3D Analyst extension) is embedded in the same container as the LicenseControl, the 3D Analyst extension is automatically checked. - Shutdown - Set whether the LicenseControl automatically shuts down the application if license initialization fails. If the LicenseControl handles license initialization failure, a License Failure dialog box appears to the end user before the application is shut down. If the developer handles license initialization failure, the ILicenseControl interface members can be used to obtain information on the nature of the failure before the application is programmatically shut down.
See Also:
Controls library overviewHow to programmatically handle LicenseControl initialization failure
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine |
ArcGIS for Desktop Basic | |
ArcGIS for Desktop Standard | |
ArcGIS for Desktop Advanced |