Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
JPG and GIF Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00477527
Message ID:
00477528
Vues:
26
>In my stock control module I have the option to save a picture of the item.
>I use VFP6 with SP3 and in some computers is possible to save and show the image in any of the supported format including JPEG and GIF and in some it shows only the icon that is displayed for this picture.
>If I copy and paste direct the images in my general field then is working even in these computers.
>
>Can anyone help to solve this problem.

In all probability, the systems that do not show the image do not have an OLE server for the .GIF and/or .JPG file formats; General fields rely on the services of another program (not VFP) to manipulate the embedded or linked data via OLE; the server for the file type relies on the registry to designate an OLE server for the image. In order to display/manipulate these image types, you'll have to make sure that each target machine has an appropriate app installed which registers itself to act as the OLE server for the file type.

When you copy an image to the clipboard and then paste the clipboard content, rather than adding the file via APPEND GENERAL, the image on the clipboard is probably saved as either a bitmap (.BMP) or Windows Metafile (.WMF) format rather than the original image type; Windows provides an OLE Server for these formats (MSPAINT) as a part of the base operating system. Other software is needed to handle the other file formats stored in the General field. Some common apps that can handle this task include PaintShop Pro, Adobe Photoshop, and the Kodak Imaging product.

Rather than using a General field, you might use an Image control to display the graphics instead, and save the full path to the image file in a character or memo field rather than using a General field - you'll find that the size of your database will be far smaller and the image will be handled consistently; with a General field, you're subject to the whims of the OLE Server for the file type on each target system, so the display may vary between systems where different server apps are in use for the same filetype at different locations.

I avoid General fields as much as possible; aside from specialized situations where I actually need to manipulate the OLE object directly within the VFP app, it's usually easier and safer to use another approach like an ActiveX control.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform