Solved

OLE, embedding and linking

Posted on 1999-01-25
9
143 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
Comment Utility
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 69

Expert Comment

by:Éric Moreau
Comment Utility
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
Comment Utility
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
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:username1
Comment Utility
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 69

Expert Comment

by:Éric Moreau
Comment Utility
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
Comment Utility
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 69

Expert Comment

by:Éric Moreau
Comment Utility
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
Comment Utility
Many thanks to Emoreau.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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 …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now