Release 10.1A: OpenEdge Development:
Programming Interfaces

> ## Requirements for using ActiveX controls

> You can access ActiveX controls in two modes:

> - Design mode

> - Run mode

> Design-mode (or design-time) access allows you to modify properties that initialize the control and define it for use in an application. For many controls, these properties affect such attributes as color and size, but also enable and disable other special features unique to each ActiveX control. In general, design-time properties affect the appearance and initial internal state of an ActiveX control. Design-time properties are generally readable, but might not be writable at runtime.

> Run-mode (or runtime) access allows your application to interact with the control, responding to events, invoking methods, and getting and setting properties that affect the ActiveX control at runtime. Run-time properties might not be readable or writable at design time.

> The requirements for working in each mode differ.

> ##### Design-mode requirements

> To define an ActiveX control for use in an OpenEdge application, you must:

> - Have the ActiveX control installed in your Windows environment — This includes one or more DLL files. Install the ActiveX control according to the vendor’s instructions. The primary control file usually has a `.ocx` extension. Note that other files might also be required and installed, as well.

> - Have a license installed that allows you to access the ActiveX control
>   in design mode — Not all ActiveX controls require licenses for design-time access, but most commercial ActiveX controls do. Licenses generally come with the vendor’s installation, and are either recorded in the registry or in a license file, often with a`.lic` extension. Progress stores the license information for the ActiveX controls that it installs in the registry.

> - Use the OpenEdge AppBuilder to create an instance of the ActiveX control in your application — The AppBuilder allows you to select the ActiveX control in design mode and place an instance of it into your application. It also allows you to set the values the properties of the control will initially assume at runtime, and saves these values in a separate binary file. This file (by default) has the same name as your application file with the `.wrx` extension. The `.wrx` file contains the definitions of all ActiveX control instances in the corresponding application (.w) file.

> Aside from using the AppBuilder to create ActiveX control instances, you can also code OCX event procedures and control-frame event triggers with minimal effort using the AppBuilder. The AppBuilder event list includes both ActiveX control events and Progress control-frame widget events. The control-frame event names appear first, followed by the ActiveX control event names prefixed by OCX. For more information on accessing this list of events, see OpenEdge Development: AppBuilder .

> ##### Run-mode requirements

> An ActiveX control is always in run mode when you execute a OpenEdge application that includes it. No license is required for run-time access to an ActiveX control. Thus, to deploy and execute an application that contains ActiveX controls, you must provide at least the following files:

> - The `.w` file generated by the AppBuilder for your application, or the compiled r-code file.

> - The `.wrx` file saved with your application.

> - The `.ocx` file for each ActiveX control contained in your application.

> - Other DLL support files and files containing data and bitmaps that come installed with the ActiveX control.

> The `.wrx` file contains most of the information required to use each ActiveX control instance at runtime, often including references to bitmaps and other external files.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095