DEF OBJECT |
Define Windows Object |
1. |
DEF OBJECT com_id,objname$ | |
2. |
DEF OBJECT com_id,@(col,ln,wth,ht) { |=}objname$ | |
3. |
DEF OBJECT com_id, "*" |
"*" |
An asterisk displays registered COM controls. |
@(col,ln,wth,ht) |
Numeric expressions. Column and line coordinates for top left corner, width in number of columns and height in number of lines. |
com_ID |
Numeric variable to receive a handle (memory pointer to object). |
objname$ |
Name by which the COM object is registered in the Windows system registry sub-key HKEY_CLASSES_ROOT. |
The DEF OBJECT directive is used to create a new instance of a specified COM object. Upon successful execution of DEF OBJECT, a reference to the object objname$ will be placed into the supplied numeric variable com_id.
This is a feature of the PxPlus Event Handling Interface and Component Object Model (COM), an industry-standard technology used by applications to expose methods, properties, and events to development tools, macro languages, and other applications. See Automation in PxPlus.
DEF OBJECT com_id,objname$[,ERR=stmtref]
Use this format to create a link to an invisible OLE/OCX/ActiveX object. This format associates the object with the current window, yet it is hidden from view:
def object this_com_id,"Mabry.SoundX"
Once the definition is complete, this_com_id will contain a handle to the object. This handle will be used to get and set properties and methods and service events. Note that since the value returned in com_id is a handle (memory pointer) to the object, it should not be changed by the application.
DEF OBJECT com_id,@(col,ln,wth,ht) {, |=}objname$[,ERR=stmtref]
This format defines a visible object and associates it with a location in the current window:
def object numvar,@(col,row,wide,high),"object_name",err=2000
def object numvar,@(col,row,wide,high)="object_name",err=2000
DEF OBJECT com_id,"*"
Use this format to display a pop-up window listing the COM controls currently installed on the system.
DELETE OBJECT Remove Windows Object
ON EVENT Event Processing
Apostrophe Operator
Automation in PxPlus
def object X,"*"
def object X,"Word.Application",err=*next
def object X,@(1,1,70,20)="Word.Document"
def object X,"[dcom]MyServer;Shell.Explorer"
def object X,@(10,2,20,10)="[file]c:\y documents\test.doc"
def object X,"VCF1.VCF1Ctrl.1;License=8041207972768742028669631967"
def object X,"[running or new]Excel.Application"