Activate PowerScript function
Description
Activates the object in an OLE container, allowing the user
to work with the object using the server’s commands.
Controls
OLE controls and OLE DWObjects (objects within a DataWindow
object that is within a DataWindow control)
Syntax
|
1 |
<span>objectref</span>.<span>Activate </span>(<span> activationtype</span> ) |
|
Argument |
Description |
||
|---|---|---|---|
|
objectref |
The name of the OLE control or the fully The fully qualified name for a DWObject has this syntax:
|
||
|
activationtype (optional) |
A value of the enumerated datatype omActivateType
|
Return Values
Integer. Returns 0 if it succeeds and
one of the following negative values if an error occurs:
-
-1 Container is empty
-
-2 Invalid verb for object
-
-3 Verb not implemented by object
-
-4 No verbs supported by object
-
-5 Object cannot execute verb now
-
-9 Other error
If any argument’s value is null,
Activate returns null.
Examples
This example activates the object in ole_1 in
the server application:
|
1 |
integer result |
|
1 |
result = ole_1.<span>Activate</span>(OffSite!) |
This example activates the OLE DWObject ole_graph in
the DataWindow control dw_1 in the
Microsoft Graph server application:
|
1 |
integer result |
|
1 |
result = dw_1.Object.ole_graph.<span>Activate</span>(OffSite!) |
See Also
-
OLEActivate in the DataWindow
Reference or the online Help