Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display photo held in general field
Message
De
14/08/2009 11:40:45
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
14/08/2009 11:24:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Divers
Thread ID:
01418119
Message ID:
01418124
Vues:
56
>I know this has been discussed before, but I don't have the search-fu that others have.
>
>I've got a General type field in a table, holding a .bmp image and I'd like to display said image in an Image field on a form - but it's not liking anything I'm trying

General fields are admiral trouble... because they contain a bmp representation of the file, the file itself, and some info about the file type. Then for displaying and/or editing, VFP passes the info to Windows about the file's type (called CLASS in general field's syntax), and the Windows would then find the app responsible for handling that type, which would then open it in a window VFP would provide, and possibly mix its menu with VFP's system menu. A little bit of an embedded document.

Downsides:

- you may be using a filetype which is handled by different apps, depending on what's installed on current machine. Your bmp may open in Paint on one, and in a full Photoshop suite on another machine.

- it may not open at all, if the type was registered to an app which was uninstalled later and wasn't reassigned (the Windows won't do that automagically), or wasn't ever installed

- general fields can be huge... because of the bmp representation. You can have a 9MPix gif or png of a simple logo, which compresses losslessly to 34K, for example. Your general field will still be about 30 megabytes because it will expand it into a bmp to have something to show in its window while it's the controlsource of a control (without actually being edited - then the app would use the 34K image to actually do something).

Upsides:

- when found in legacy tables, they are easier to keep than to replace with external files or files in binary memos.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform