class OLE
Displays an OLE document that is stored in an OLE field, and lets the user initiate an action in the server application that created the document.
Syntax
[<oRef> =] new OLE(<container> [,<name expC>])
<oRef>
A variable or property—typically of <container>—in which to store a reference to the newly created OLE object.
<container>
The container—typically a Form object—to which you’re binding the OLE object.
<name expC>
An optional name for the OLE object. If not specified, the OLE class will auto-generate a name for the object.
Properties
The following tables list the properties, events, and methods of interest in the OLE class.
Property |
Default |
Description |
Stretch |
Determines the size and position of the contents of the OLE object (0=Stretch, 1=Top left, 2=Centered, 3=Keep aspect stretch, 4=True size) | |
0 – None |
How the OLE object is anchored in its container (0=None, 1=Bottom, 2=Top, 3=Left, 4=Right, 5=Center, 6=Container) | |
OLE |
Identifies the object as an instance of the OLE class | |
false |
Whether the OLE object is surrounded by the border specified by borderStyle | |
(OLE) |
Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName | |
|
The Field object that is linked to the OLE object | |
|
The OLE document file (if any) that is linked with the current OLE field. | |
|
Number that reflects whether an OLE field is empty (0), contains an embedded document (1), or contains a link to a document file (2) | |
|
The server application that is invoked when the user double-clicks on an OLE viewer object
| |
Event |
Parameters |
Description |
|
After the contents of the OLE object have changed | |
|
After the form containing the OLE object has been closed
| |
Method |
Parameters |
Description |
<OLE verb expN>,
|
Starts an OLE server session |
The following table lists the common properties, events, and methods of the OLE class:
Property |
|
Event |
Method |
before |
name |
Description
Place an OLE object in a form to view and edit a document stored in an OLE field. For example, if an OLE field contains a bitmap image created in Paintbrush, double-clicking the OLE object linked to the field starts a session in Paintbrush and places the image in the Paintbrush work area.
OLE stands for object linking and embedding. When you link a document to an OLE object, the OLE field does not contain the document itself; instead, it holds a link to a file containing the document. When you embed a document in an OLE field, a copy of the document is inserted into the OLE field, and no connection is made to a document file.
By double-clicking the OLE object, the user can invoke the application that created the OLE document. Therefore, if an image was created in Paintbrush and linked or embedded in the OLE field, double-clicking on the field starts a session in Paintbrush; the image is displayed in the Paintbrush drawing area, ready for editing. If the object was linked, any changes made in the Paintbrush session are stored in the document file; if the object was embedded, the changes are stored in the OLE field only.
An OLE viewer window object displays the contents of an OLE field. (Use the dataLink property to identify the field.) Each time the record pointer is moved, the contents of the viewer window are refreshed to display the OLE field in the current record.