home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
private
/
mpc93mar.zip
/
OLE.DAT
< prev
next >
Wrap
Text File
|
1993-02-17
|
5KB
|
107 lines
Object Linking and Embedding - An Explanation [from MICROSOFT]
What is OLE and how can I use it?
Windows 3.1 offers true Object Linking and Embedding (OLE). With OLE,
you can create a drawing, sound file, or other object in an application
such as Paintbrush or Sound Recorder, and then insert (link or embed)
it into another file. For example, suppose you are working on a Write
document in which you have embedded a drawing. To make changes to the
drawing, you select it and open Paintbrush from within the Write
document. The drawing is updated automatically. You don't have to
remember where the drawing is; the Windows 3.1 OLE feature finds it
for you.
Embed means that a complete object (file, drawing, etc.) is inserted
in a primary document. To edit the embedded object, you just
double-click the object to launch the related program. Embedding a
file makes it easier to keep track of in relation to your primary
document, because it only exists as a file within your primary
document. For example, if you have a Write file with a Paintbrush
graphic embedded in it, you donÆt need to have the Paintbrush file on
your hard disk; you can edit it within Write.
Link means that your primary document contains only pointers to an
external file that appears in the primary document. Double-clicking a
linked document causes Windows to launch the related program and look
for the file that is linked to your primary document. Although with
linking you have the disadvantage of having to maintain separate
files, you gain the advantage of being able to automatically update
multiple files when you update a linked file (all files that contain
the link are updated). For example, if you have a Paintbrush graphic
linked to three Write files and one Microsoft Excel file, when you
change anything in the Paintbrush file, it automatically gets updated
in the Write and Excel files.
OLE is now available in Windows Paintbrush, Write, Cardfile, and Sound
Recorder, allowing you to transfer and share information between these
programs in a powerful new way.
Applications that provide objects are called server or source
applications. Those that accept objects are called client or
destination applications.
To practice embedding an object into another programs file, do the
following:
a. From the Accessories group, double-click the Write icon.
b. Choose Insert Object from the Edit menu. The Insert Object dialog
box is displayed. All applications on your computer that support
OLE are listed.
c. Use the arrow keys to scroll down the list and then double-click
Paintbrush to select it. The Paintbrush program will open.
d. Create a quick drawing or type some text.
e. Choose Exit & Return to (Untitled) from the File menu. Paintbrush
will automatically close. Choose "Yes" to update and the image you
just created will appear as an embedded object in your Write file.
Editing an object is easy: just double-click it to open the server
application the object was created in, make your changes, choose Update,
and then choose Exit & Return to (Untitled) from the File menu to save
the file and return to your main document.
With object linking, you can use the same information (the object) in
several different documents. An object can be any kind of file,
including text, drawing, or sound. You first create the object and then
connect (or link) it with as many documents as you want. You save disk
space because only one copy of the information exists - the documents
contain only the link. And you save time and effort because you don't
have to cut and paste the information into each document every time you
change anything. OLE makes integrating your applications easy.
To practice linking a drawing using OLE in Windows 3.1, do the
following:
a. From the Accessories group, double-click the Paintbrush icon.
b. Choose Open from the File menu and then double-click WINLOGO.BMP.
The Microsoft Windows logo appears.
c. Click the Paintbrush Cutout tool (the icon on the upper-right side
of the drawing tools) and then drag a rectangle around the graphic
to select it.
d. Choose Copy from the Edit menu. A copy of the drawing will be
placed into the Windows Clipboard.
e. From the File menu, choose Exit.
f. Double-click the Write icon.
g. Choose Paste Link in the Edit menu. You now have a Paintbrush
graphic
(a link to the Paintbrush file) in your Write document. Whenever you
make changes to the Paintbrush file, the graphic in the Write document
is automatically updated.
To edit a linked object, just double-click it to open the server
application, make your changes, and then choose Exit from the File menu
to save the file and return to your main document.