Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

OLE, embedding and linking

Posted on 1999-01-25
9
Medium Priority
?
152 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 120 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

782 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