Directives

DELETE OBJECT

Remove Windows Object

Format

DELETE OBJECT com_id[,ERR=stmtref]
 
Where:

com_id

Numeric variable to receive a handle (memory pointer to the COM object).

stmtref

Program line number or statement label to which to transfer control.

Description

Use DELETE OBJECT to remove/disconnect associated Windows COM objects (OCX/OLE/ActiveX) from the screen.

Note:
An OCX/OLE/ActiveX object is automatically destroyed when the window it was defined in is dropped.

See Also

For information on the creation of an OCX (Object Component eXtension) object, see DEF OBJECT Define Windows Object.

Note:
In PxPlus Object Oriented Programming, DELETE OBJECT can be used in place of the DROP OBJECT directive.

Example

def object handle,@(2,2,70,16)="Shell.Explorer"
errcode=handle'Navigate2("www.pvxplus.com")
input *
delete object handle