Olecontainer Control Introduction

Source: Internet
Author: User
Tags ole

Main properties of the Olecontainer control

1) Allowinplace Property allowinplace:boolean;
This property is used to determine how the OLE Object service program is started, and if it is false, the entire OLE service is opened when the OLE object is activated, which is a separate

When a window is opened and true, the menu of the service is merged into the application.

2) autoactive type tautoactivate= (Aamanual,aagetfocus,aadoubleclick);
Property autoactivate:tautoactivate;
Look for ways to open. When Aamanual is active, you must call Method DoVerb (onshow) in your program to activate the OLE object.

3) CanPaste Property canpaste:boolean;
Read-only property, true if the contents of the Clipboard are suitable for pasting into an OLE object, otherwise false

4) Copyonsave Property copyonsave:boolean;
For true, the OLE object is temporarily written to a file, whereas the opposite means that it is all left inside.

5) iconic property iconic:boolean;
is displayed as an icon to save space on the screen

6) Linked Property linked:boolean;
A read-only property that returns a true representation that an OLE object is connected to a document, and returns a false representation that the OLE object is embedded in the document.

7) Modify Property modified:boolean;
This property is set to True when the OLE object has changed (including when the object is deleted or replaced by another OLE object)

8) newinserted Property newinserted:boolean;
Read-only if the Insertobjectdialog function you just called inserts an OLE object and returns TRUE. You can call DoVerb (ovshow) to activate the OLE

Like.

9) Oleclassname Property oleclassname:string;
Read-only. Returns the class name of an OLE object that can be used as its own label when there are multiple OLE objects in the program.

OleObject Property oleobject:variant;
Read-only, returning OLE objects in the OLE container, this property is important to access the OLE service program.

One) Oleobjectinterface property oleobjectinterface:ioleobject;
Read-only. Returns the OLE object's OLEObject interface, which is required for APIs that call OLE directly.

Oldstreamformat Property Oldstreamformat:boolean;
If True, OLE objects are stored in OLE1 format and are stored in OLE2 format as false.

Primaryverb Property Primaryverb:integer;
Read-only. Returns the index number (ordinal) of the main action in the operation that the OLE object can take

SizeMode type Tsizemode = (Smclip, Smcenter, Smscale, Smstretch, smautosize);
Property sizemode:tsizemode;
Smclip, more than the portion of the container is to be cut.
Smcenter, in the middle.
Smscale, automatically adapts to the size of the container
Smstretch, Auto-full
Smautosize, the container automatically adjusts to fit the OLE size.

) State type tobjectstate= (osempty,osloaded,osrunning,osopen,osinplaceactive,osuiactive);
Property state:tobjectstate;
Read-only, returning the state of the OLE object, which can be the following value.
Osempty, there are no OLE objects in the container.
Osloaded, there are OLE objects in the container. But the OLE service program is not running.
Osrunning, the server is running.
Osopen, the object is running, and the OLE service program runs separately.
Osinplaceactive, the object is running, and the OLE Service program menu is going to be merged into the client program to run.
Osuiactive, the object is running, and the OLE Service Program menu has been merged into the client program to run.Main methods of Olecontainer controls

Main methods of Olecontainer controls

1) changeicondialog function Changeicondialog:boolean;
Calling this function opens a dialog box that changes the icon. When an OLE object is displayed as an icon, it is displayed as a user-selected icon.

2) Close process procedure close;
Shut down. If the OLE object has been modified, calling close will first save the OLE object.

3) Copy process procedure copy;
Copy an OLE object to the Clipboard

4) Cteatelinktofile Method procedure Createlinktofile (filename:string; Iconic:boolean);
Creates an OLE object whose contents are read from the specified file, and the OLE object that is created is linked to the OLE container. If an OLE object already exists in the OLE container, the existing OLE object is deleted, and unsaved modifications are invalidated. The iconic parameter is set to true to indicate that the OLE object is displayed as an icon.

5) CreateObject process. Procedure CreateObject (const Oleclassname:string;iconic:boolean);
This procedure is used to create an OLE object, the Oleclassname parameter specifies the distinguished name of the object, the created OLE object is embedded in the OLE container, and if an OLE object already exists in the OLE container, the existing OLE object is deleted and unsaved modifications are invalidated. The iconic parameter is set to true to indicate that the OLE object is displayed as an icon.

6) Createobjectfromfile Process procedure Createobjectfromfile (const filename:string; Iconic:boolean);
Creates an OLE object whose contents are read from the specified file, and the OLE object that is created is embedded in the OLE container. If an OLE object already exists in the OLE container, the existing OLE object is deleted, and unsaved modifications are invalidated. The iconic parameter is set to true to indicate that the OLE object is displayed as an icon.

7) Createobjectfrominfo method, procedure createobjectfrominfo (const createinfo:tcreateinfo);
Creates an OLE object whose contents are read from the record specified in the Createinfo parameter year (this parameter is a record type that contains the information needed to create the OLE object)

8) DoVerb method. Procedure DoVerb (Verb:integer);
Used to manipulate OLE objects, the verb parameter specifies the type of operation.

9) Objectpropertiesdialog function Objectpropertiesdialog:boolean;
Used to open the Windows OLE Object Properties dialog box, which modifies the properties of an OLE object.

) Run method. Procedure run;
Used to run the OLE service program, but does not activate the OLE object itself, and activating the OLE object will be very fast when the service program is in the running state.

One) Pastespecialdialog method function Pastespecialdialog:boolean;
This method opens the Selective Paste dialog box for Windows.

Olecontainer Control Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.