The system stores information about the OLE server applications and OLE custom controls installed on your computer in the registry.
PowerBuilder reads the registry and displays the registration information for all registered OLE servers and custom controls.
To view the OLE information:
-
Click the Browser button on the PowerBar.
-
Click the OLE tab in the Browser.
There are three categories of OLE object, as shown in the following table.
OLE object category |
Description |
---|---|
Insertable objects |
OLE servers that can link or embed objects in OLE containers. OLE servers that support insertable objects must have a visual component. |
Custom controls |
ActiveX controls that can be included in an OLE container. ActiveX controls can also be insertable objects. If so, they will appear on both lists. |
Programmable objects |
OLE servers to which you can send automation instructions. A programmable object might not have a visual aspect, which means it supports only automation and cannot support insertable objects. |
When you expand each of these categories, you see the individual OLE servers that are installed. Each OLE server can also be expanded. The information provided depends on the category.
Class information
All the categories provide class information about the OLE server. You see a list of registry keys. Some of the keys are meaningful in their own right and some have values. The values, or simply the presence or absence of keys, tell you how to find the OLE server and what it supports.
The following table lists some typical keys and what they mean.
Registry key |
Value |
---|---|
GUID |
The global unique identifier for the OLE server. |
TypeLib - GUID |
The global unique identifier for the type library for an ActiveX control. |
ProgID |
A string that identifies the OLE server or ActiveX control. It usually includes a version number. |
VersionIndependentProgID |
A string that identifies the OLE server or ActiveX control, but does not include a version number. |
InprocServer32 |
The name of the file for the 32-bit version of an ActiveX control. |
ToolboxBitmap32 |
The name of a bitmap file for the 32-bit ActiveX control that can be used to represent the ActiveX control in toolbars or toolboxes of a development environment. |
DefaultIcon |
The name of an icon file or executable containing an icon to be used for an insertable icon that is being displayed as an icon. |
Version |
The version number of the OLE server or ActiveX control. |
Insertable |
No value -- specifies that the entry is an OLE server that supports insertable object. |
Control |
No value -- specifies that the entry is an ActiveX control. |
Verb |
No value -- specifies that the entry accepts verbs as commands. |
In addition to registry information, the Browser displays the properties and methods of ActiveX controls and programmable objects. To provide the information, PowerBuilder uses the registry information to query the ActiveX control for its properties and methods. The information includes arguments and datatypes.
Browser as script-writing tool
Take advantage of the Browser when writing scripts. You can find property and function names and paste them into your scripts. The Browser provides the full syntax for accessing that property.
To paste OLE information into a script:
-
Open the Browser.
-
Click the OLE tab.
-
Expand the list to find what you want. For example, find the ActiveX control you want and expand the list further to find a property.
-
Highlight the property and select Copy from the pop-up menu.
-
Position the insertion point in the Script view and select Paste from the pop-up menu.
The Browser inserts syntax like this into your script:
OLECustomControl.Object.NeedlePosition
After you change OLECustomControl to the actual name of your control, your script correctly accesses the NeedlePosition property.
What the Browser pastes into your script depends on what you have selected. If you select an object (a level above its properties in the hierarchy), PowerBuilder pastes the object's ProgID. You can use the ProgID in the ConnectToNewObject function.