Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : Accessing COM object properties and methods
 

Accessing COM object properties and methods

A COM object property is a value that defines the visible, functional, and other characteristics of a COM object (ActiveX Automation object or ActiveX control). An ActiveX control property is classified as a design-time or run-time property depending on when you can change it. A design-time property can be changed using the Properties Window of the AppBuilder. A run-time property can be changed from ABL at run time. Generally, you can read both design-time and run-time properties at run time. In all other respects, COM object properties are functionally analogous to handle attributes.
A COM object method is a specialized function associated with a COM object that performs an action on the COM object or alters the behavior of the COM object. COM object methods may or may not return a value and may or may not require parameters. A return value may be a component handle to another COM object; however, many methods return other types of information or no information at all. Like handle methods, you execute COM object methods by calling them directly as statements rather than as part of an expression. In all other respects, COM object methods are functionally analogous to handle methods.
The basic syntax for accessing COM object properties and methods from ABL is similar to accessing handle attributes and methods. These are the main differences:
*You must access a COM object property or method with reference to an instantiated COM object. ABL supports the COM-HANDLE data type to provide COM object references for accessing properties and methods.
*You might have to specify the parameters of COM object methods with more type information, depending on the method and how the COM object is implemented.
*All COM objects are dynamic objects, so you never qualify a COM object reference by a static container reference (such as a static frame or menu widget).
* Syntax for accessing COM object properties and methods