Main Properties of the olecontainer Control

Source: Internet
Author: User
Tags ole
Original article: http://blog.csdn.net/Foggia/archive/2007/11/21/1896326.aspx

1) allowinplace property allowinplace: Boolean;
This attribute is used to determine how to start the OLE object service program. If it is false, when the OLE object is activated during execution, the entire Ole service program is opened, that is, separately

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

2) autoactive type tautoactivate = (aamanual, aagetfocus, aadoubleclick );
Property autoactivate: tautoactivate;
Find the method. When aamanual is enabled, the OLE object must be activated and the doverb (onshow) method must be called in the program)

3) canpaste property canpaste: Boolean;
Read-only attribute. If the content in the clipboard is suitable for pasting to an OLE object, the value is true; otherwise, the value is false.

4) copyonsave property copyonsave: Boolean;
If it is true, the OLE object is temporarily written to a file, and vice versa.

5) iconic property iconic: Boolean;
Whether to use icons to save space on the screen

6) linked property linked: Boolean;
Read-only attribute. If the returned result is true, the OLE object is connected to the document. If the returned result is false, the OLE object is embedded in the document.

7) Modify property modified: Boolean;
When the OLE object changes (including this object is deleted or replaced by another OLE object), this attribute is set to true.

8) newinserted property newinserted: Boolean;
Read-only. If the insertobjectdialog function just called inserts an OLE object, the true result is returned. You can use doverb (ovshow) to activate this ole pair.

Like.

9) oleclassname property oleclassname: string;
Read-Only. Return the Class Name of the OLE object. When there are multiple OLE objects in the program, you can use this attribute as their respective labels.

10) oleobject property oleobject: variant;
Read-Only: returns the OLE object in the OLE container. This attribute is very important and can be used to access the OLE service program.

11) oleobjectinterface property oleobjectinterface: ioleobject;
Read-only. The oleobject interface of the OLE object is returned. This interface is required to directly call the ole api.

12) oldstreamformat property oldstreamformat: Boolean;
If true, OLE objects are stored in ole1 format. If false, they are stored in ole2 format.

13) primaryverb property primaryverb: integer;
Read-Only. Return the index number (serial number) of the master operation in the operations that can be performed by the OLE object)

14) sizemode type tsizemode = (smclip, smcenter, smscale, smstretch, smautosize );
Property sizemode: tsizemode;
Smclip, the portion beyond the container will be dropped.
Smcenter, middle.
Smscale: automatically adapts to the container size
Smstretch, automatically full
Smautosize, the container is automatically adjusted to adapt to the OLE size.

15) State type tobjectstate = (osempty, osloaded, osrunning, osopen, osinplaceactive, osuiactive );
Property state: tobjectstate;
Read-only, returns the OLE object status, which can be the following values.
Osempty. There is no OLE object in the container.
Osloaded, which contains OLE objects in the container. However, the OLE service program is not running.
Osrunning, the server is running.
Osopen, the object is running, and the OLE service program runs independently.
Osinplaceactive, the object is running, and the OLE service program menu will be merged into the client program to run.
Osuiactive: the object is running. The OLE service program menu has been merged into the client program to run the main method of the. olecontainer control.

Main method of olecontainer Control

1) changeicondialog function changeicondialog: Boolean;
This function opens a dialog box for changing the icon. When the OLE object is displayed as an icon, it is displayed as the selected icon.

2) Procedure close;
Close. If the OLE object has been modified, calling close will first save the OLE object.

3) Procedure copy in the copy process;
Copy the OLE object to the clipboard.

4) cteatelinktofile method procedure createlinktofile (filename: string; iconic: Boolean );
Create an OLE object. Its content is read from the specified file. The created OLE object is linked to the OLE container. if an OLE object already exists in the OLE container, the existing OLE object will be deleted, and unsaved changes will also be voided. if the iconic parameter is set to true, the OLE object is displayed as an icon.

5) Createobject process. Procedure Createobject (const oleclassname: string; iconic: Boolean );
 

This process is used to create an OLE object. The oleclassname parameter specifies the object identification name. The created OLE object is embedded in the OLE container. If there is already
OLE object. The existing OLE object will be deleted, and unsaved changes will also be voided. Set the iconic parameter to true to indicate that the OLE object is displayed as an icon.

6) Procedure createobjectfromfile (const filename: string; iconic: Boolean );
Create an OLE object. Its content is read from the specified file. The created OLE object is embedded in the OLE container. if an OLE object already exists in the OLE container, the existing OLE object will be deleted, and unsaved changes will also be voided. if the iconic parameter is set to true, the OLE object is displayed as an icon.

7) createobjectfrominfo method, procedure createobjectfrominfo (const createinfo: tcreateinfo );
Create an OLE object whose content is read from the record specified by the createinfo parameter year (this parameter is a record type and contains the information required to create an OLE object)

8) doverb method. Procedure doverb (verb: integer );
This parameter is used to operate an OLE object. The verb parameter specifies the operation type.

9) objectpropertiesdialog function objectpropertiesdialog: Boolean;
Used to open the Windows OLE object Properties dialog box, used to modify the properties of the OLE object.

10) run method. Procedure run;
It is used to run the OLE service program but does not activate the OLE object itself. When the service program is running, activating the OLE object will be very fast.

11) pastespecialdialog method function pastespecialdialog: Boolean;
This method opens the select Paste dialog box for Windows.

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.