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
Solved

OLE, embedding and linking

Posted on 1999-01-25
9
147 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Title # Comments Views Activity
VBA filters 2 65
Convert VB6 MSXML2.ServerXMLHTTP process to C# 2 58
VBA: Select SQL query based on a config Sheet v2 11 49
How to read File Date Created using VB6 8 52
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…

829 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