Syntax 3: For loading an OLE object from a file into a
control
Description
Opens an OLE object in a file and loads it into an OLE
control.
Applies to
OLE controls
Syntax
|
1 |
olecontrol.Open ( OLEsourcefile ) |
|
Argument |
Description |
|---|---|
|
olecontrol |
The name of the OLE control into which you want to load |
|
OLEsourcefile |
A string specifying the name of an OLE storage file |
Return value
Integer.
Returns 0 if it succeeds and one of the following negative values
if an error occurs:
-1 — The file is not found or its data has an invalid
format
-9 — Other error
If any argument’s value is null, Open returns null.
Examples
This example opens the object in the file MYSTUFF.OLE and loads it
into in the control ole_1:
|
1 2 |
integer result result = ole_1.Open("c:ole2mystuff.ole") |
See also