Solved

OLE, embedding and linking

Posted on 1999-01-25
9
149 Views
Last Modified: 2010-05-18
A book said that in OLE, embedding needs much more disk space than linking. I thought I understood it: embedding saves the picture (if the outer application is Paint) in the VB application but linking only know where is the picture which is outside the VB application.

However, when checked the files I found both embedding and linking need save the pictures within VB application itselves. Both of them have got .frx files with the same size!

Perhaps I misunderstood embedding and linking? Can you help?
0
Comment
Question by:username1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 1

Accepted Solution

by:
mackagp earned 40 total points
ID: 1470536
OLE will embed the picture into the project (ie form) and save a .frx (VB binary file) , thus another copy of the original file is created, and i'm not too sure which format it is saved in. probably BMP. (and then into the EXE once compiled)
Where as linking will path to the file and load it from a dedicated path (thus you need to know exactly where the file is so that you can load it). This means only one copy is stored on disk.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 1470537
Even link keeps an image of your document! If the link is broken, you will see that image but you won't be able to work with it.


0
 

Author Comment

by:username1
ID: 1470538
1. As Emoreau said, even Linking saves the picture/document in VB application. That is the .frx file, the same as in Embedding case.

2. If the source application (Paint, Word...) damaged, we should not be able to modify the picture/document in both Embedding and Linking cases, I think.

3. Do you think the picture wont be compiled into the exe file in Linking case but it will in Embedding case?
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 1470539
If you embed an object, you don't need the source file anymore. Users will be able to modify this object (but the original stays untouched).

If you link an object, you will still need a valid reference at run-time to allow your user to modify it (even if they saw an image).
0
 

Author Comment

by:username1
ID: 1470540
To Emoreau

Thank you very much for your comments.

I still not clear :-( When you say "object", do you mean some kind of copy of the source application, such as Paint? If your answer is yes, can we run the VB application Embedding with Paint after deleting (not really) Paint?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 1470541
Yes an object can be any document generated by another application (as the O says in OLE).

Yes, once an object is embedded, its source can be deleted (or if you distribute you application, you do not have to distribute it).
0
 

Author Comment

by:username1
ID: 1470542
Hi Emoreau

Yes, I like your comments: very clear.

If my user has got no Paint.exe, can he use my application (Embedding Paint) any paint something on the OLE control as if he got Paint.exe? If your answer is yes again, we need to remember to check the lisence of Paint before distribute the application...

0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 1470543
If your users don't have the application that can read your embedded object, your users will see an image of your object (because it is kept) but they won't be able to edit it.
0
 

Author Comment

by:username1
ID: 1470544
Many thanks to Emoreau.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question