Solved

OLE, embedding and linking

Posted on 1999-01-25
9
148 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
  • 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
Industry Leaders: 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!

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 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