A SERVICE OF

logo

3.10.2 Instantiating ActiveX objects
Instantiating ActiveX Objects
To instantiate (i.e. create an instance of) an ActiveX object, you first need to declare a variable of type
object, or of type class. Then you just call the built-in function CreateObject. The built-in function
CreateObject takes as an argument a string expression that evaluates to the name of the ActiveX object
type you want to instantiate. See the Irie Pascal Programmer's Reference Manual (in "progref.html") for
more information.
NOTE: After you have finished using the ActiveX object make sure you get rid of it (see disposing of
ActiveX objects).
3.10.3 Calling ActiveX object methods
Invoking the Methods of ActiveX Objects
The methods exposed by ActiveX objects define the actions that the objects can perform. Before invoking
the methods of an ActiveX object you need to instantiate the object (see instantiating ActiveX objects).
Invoking a method of an instance of an ActiveX object is similar to calling a function or procedure. The
difference is that where the name of the function or procedure would normally go you need to put the
following:
object-variable '.' name
where object-variable is an object variable that contains an instance of the ActiveX object
and name is the name of the method being invoked.
See the Irie Pascal Programmer's Reference Manual (in "progref.html") for more information.
NOTE: After you have finished using the ActiveX object make sure you get rid of it (see disposing of
ActiveX objects).
3.10.4 Accessing ActiveX object properties
Accessing the properties of ActiveX objects
The properties of ActiveX objects are functions that allow you to access the state of the objects. Before
accessing the properties of an ActiveX object, you need to instantiate the object (see instantiating
ActiveX objects). Although properties are really functions, the syntax you use to access a property is
similar to the syntax you would use to access the fields of a record. The difference is that you use
object-variable '.' property-name
instead of