7 1 3 Enrolling an ActiveX Control in the Repository

Visual LANSA

7.1.3 Enrolling an ActiveX Control in the Repository

After an ActiveX control has been  installed on your PC, you need to enrol it in the Repository as a component of type ActiveX before you can use it.

To enrol the keyboard control downloaded in the previous section, create a new component of type ActiveX.

Call it for example KeybCtrl. Always store ActiveX controls in the group ActiveX Controls so that they will be easy to locate in the editor.

When you have created the component, display its Properties tab in the editor.

Make sure the Ancestor property of the component is #PRIM_MCVO:

Then use the component's ProgID property to specify the ActiveX control to be enrolled in this component.

Click on the button with three dots. The ActiveX Component Browser window is displayed.

The browser shows ActiveX Controls (visual components) and Other Components (non-visual). The other components include ActiveX-enabled applications which can be driven through properties and methods they expose.

Click on Controls to display all the available ActiveX controls on your PC.

 

The name of the keyboard component is iKeyBoardX Control:

 

Select it and click OK.

The ProgID and the TypeLibId properties of the control are filled in. Other properties for the size, position etc. of the control become visible. The control itself is shown in the Design tab.

 

 

Save the ActiveX control. It is now enrolled in the repository.

After you have enrolled an ActiveX control, you can inspect its properties, events and methods. You can also change the values of the properties of the enrolled control (both LANSA properties and its built-in properties) to set default values for it. These values are used as defaults when you use the ActiveX component in your LANSA form or reusable part.

The control is now ready to be used in your LANSA applications. After you have enrolled an ActiveX control in a component, you would typically only reopen the component if you wish to change any of its default properties.

 

Ý 7.1 Using ActiveX Controls