How Insert Picture into Unbound Object Frame with FilePicker (OpenFile Dialog Box)

a_20120

tan
Local time
Tomorrow, 00:22
Joined
Nov 21, 2006
Messages
175
Hi all,
I have a form that contains an Unbound Object Frame, and a button.
What I want:

When I click on the Button I want the OpenFile Dialog Box appears to me, to select my favorite picture and then put that picture in the Unbound Object Frame control.
Your kind attention and help is highly apprecited....
 
In my Table I have a Field that is OLE type, there I use the object control to Insert picture as Embedded into that Field through the Open File Dialog Box, Not Therogh the Object Browser Dialog Box.
 

Attachments

  • Object Browser.JPG
    Object Browser.JPG
    26.5 KB · Views: 758
  • OpenFile Dialog.JPG
    OpenFile Dialog.JPG
    30.7 KB · Views: 622
Hi A 20120

In my "Dictionary" database I want to display an image with each word that I create.
The Images for this database are stored in a specific folder - So I know what the path is!

For each word (LWord) in the table, I have a corresponding WrdImage where I simply store the name of the image.

In order to display the image each time that I move to another record, I make a call to the ShowPic() function [See attached code] in the "On_Current" event.

Perhaps this will work for you?
 

Attachments

Dear OldSoftBoss,

I want the pictures be with the Database, mean when i carry the Database I dont need to carry the pictures too. Therefore I need OLE, and I want to set picture into the Table Field by Open Dialog Box.
 
Embedding images in a database is a very self-limiting operation. You would do far better to take the approach of storing all image files in the same folder as the DB, then when you use the file-select object, just store the file name. You can always figure out where you are (in terms of current folder).

For a database-type variable instantiated via Set {myvar} = CurDB, you can get the {myvar}.Name property and parse it from right to left to determine your current directory / folder name. Then just tack that onto the file name you stored earlier any time you want to load an image.

Using OLE and pictures is not the best way to do this. Seriously. Once you reach a certain size, your performance goes to poop. And by embedding rather than linking, you reach that size faster. (Why? you ask....)

When you dump pix inside the database file, you are placing demands on physical memory. When you put ENOUGH pix inside the database file, you start paging to the swap file. This is defintely NG. Not Good. And by embedding the pix, you just about GUARANTEE you will hit that spot fast. On the other hand, linking means instead of storing megapixels in the MDB file, you store them externally and only store file-name strings. Then when you do a Form_Current routine on the form in question, you can load up the link to the {image-control}.Picture property and there you are, ready to view. Further, performance will be quite reasonable for linking.
 
I don't want link!!!
I need picture in DB :)

So, I assume you're the type of person who, when you go to the doctor and they say you need your appendix out, you tell them, "No, I want my tonsils out."
 
he he

he he he
But I need picture in DB, I have my reasons, trust me :)
 
Thankx LIDDLEM

Thanx very much for the reply, Could u plz send me ur DB iwth more information and comment...
I dont mean that u send me ur full DB, just the PICTURE part of that...
 
I don't have one, but the link I provided gave instructions on how to go about doing what you were asking about.
 

Users who are viewing this thread

Back
Top Bottom