Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image PROP TEXT

Status
Not open for further replies.

dEraCh2000

Programmer
Nov 14, 2007
39
BA
Hi,

I'm having some difficulty with the image control.
To assign an image at runtime I use code like
?Image{PROP:TEXT}=filepath
and some images do not show up
I have 5 image controls on a form.
When I try message(?Image{PROP:TEXT}) a get empty string
Images are in the same folder, all have similar names.

Two images that do not show up, I cant get them even by using DosLookup template control., even though it is a valid jpg, I can preview it and open it in paint.

All of these images were copied to disk using BLOBTOFILE function.

p.s. another thing, how do I rise an event so the new image gets saved to the blob field. I'm using the extension for saving. How can I tell the form to save the new record

Kind regards
Armin
 
Hi Armin,

Is the File Path an Absolute path or a Relative Path?

Is the Image Control set to Stretch? Are the Horizontal & vertical scroll bars enabled on the Image Control to pan the image if the Image Control is small for the Image?

TakeCompleted - Before Parent Call on the FORM ::

BlobColumn{PROP:Size} = 0
BlobColumn{PROP:Handle} = ?Image{PROP:ImageBlob}

should assign the Image to the BLOB.

Regards
 
Hi,

The path is absolute, formed from path() &'\Temp\' & 'pct1.'& picture extension

That's not the problem, becouse I use the same code fore every image.

Image control is set to strech.

I hade the same problem with your code as I hade with the extension.

BMP files were OK, but the JPG ones turned out to be bigger when I return them to disk from the database.

One image was 109 KB on disk. After I put it into the database, and returned it do disk again its size wnt up to 1,2 MB.

So I tried to use FILETOBLOB function to get the pictures to the database, and now it works fine.
All images are OK.

I don't understand the reason for this problem, but I'm glad I found a solution.

Kind regards

Kind regards
Armin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top