Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to display JPG in a form
Message
De
04/01/2000 00:10:24
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00276185
Message ID:
00312166
Vues:
33
Hi Ho... I need just a little more info/clarification if you can spare the time:

I finally forced the time to look at this issue again and I think your solution should work nicely but I can not get STRTOFILE() to function. Here is what is happening:

strtofile(orders.invoicescan, "c:\tempimg.jpg")

where INVOICESCAN is a General Field containing a JPG

I get "INVALID ARGUMENT VALUE, TYPE OR COUNT IS INVALID."

I can get this command to work if I am using text fields with text data but not the GENERAL FIELD. I have checked MSDN CD's and Tech Net but nothing useful came of it. Any idea's why I can not push a JPG in a General field to a file???

Another (directly related) annoying issue is that if I use a OLEBOUNDCONTROL on the same field, the graphic IS displayed if it is a BMP but not if it is a JGP. Any idea's why this is??????????

Thanx in advance.

________________________________________

>Ian,
>
>Since it's a general field you sure there aren't some other ActiveX controls to try using?
>
>I think what I'd do is strtofile() the general field out to a temp file and just point a normal VFP Image control at that file. You'll probably need to use a CLEAR RESOURCES as you navigate records and change the temp file contents.
>
>>I have just started to play with OLE in VFP6 and want do display on a form a .JPG I have stored in a GENERAL FIELD in table.
>>
>>The closest I can get so far is to click the OLEBOUNDCONTROL on the Form Toolbar and set the CONTROL SOURCE as the general field from the table in question. This solution only displays an icon for the graphic, and a user would have to double click on it to view it (in IE5 on my machine). I would like the graphic to be displayed in a small area on my form with scroll bars on it.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform