Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## COM-SELF system handle

> ##
> (Windows only)

> A component handle to the ActiveX object (ActiveX control or ActiveX automation object) that generated the event being handled by the currently executing ActiveX event procedure.

> Note: Does not apply to SpeedScript programming.

> #### Syntax

>     COM-SELF [ :OCX-property-reference | :OCX-method-reference ]

> ``OCX-property-reference` |`OCX-method-reference``

> A reference to a valid property or method associated with the ActiveX control.

> Example

> The following code fragment displays the name and position of the ActiveX control that generates a Click event:

>     PROCEDURE ANYWHERE.Click:
>       MESSAGE "Clicked control" COM-SELF:Name "at X-position" COM-SELF:Left
>                "and Y-position" COM-SELF:Top VIEW-AS ALERT-BOX.
>     END PROCEDURE.

> #### Notes

> - Unlike 4GL widget handles that have the WIDGET-HANDLE data type, the component handle returned by COM-SELF has the COM-HANDLE data type.

> - You can reference the COM-SELF handle only within an ActiveX control (OCX) event procedure.

> - The syntax for referencing ActiveX control properties and methods extends the syntax for referencing widget attributes and methods. For more information, see the "Attributes and Methods Reference" section.

> #### See also

> PROCEDURE statement, SAX-reader object handle

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095