Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bitmaps and Icons appear in wrong color
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00114939
Message ID:
00115186
Vues:
13
>I have several bitmaps and icons that - one time appear with a white background other times yellow, purple etc. I'm using a .msk file. I was told it may be the video card but I've noticed this on 5 different machines.
>
>Once the bitmap is loaded into memory - it stays that way unless I clear the memory to reload it.
>
>Is there a way around this?
>
>Thanks
>Robert

Robert,

Icons and bitmaps colors are mapped with an optimized palette by Visual FoxPro itself. What's happening, is that the palette that VFP is using is probably wrong for your type of icons and BMPs. In fact, VFP uses the color palette of the very first object displayed for all subsequent graphics. You can either turn the PALETTE OFF (SET PALETTE OFF) which will force VFP to use the color palette of the BMPs themselves, or use the SCR_ColorDepth() function of FOCUS.FLL to adapt the icon and bitmaps you're about to display, based on the screen color depth. I usually combine these two strategies by turning the palette OFF and using SCR_ColorDepth() to use 256 colors BMPs when needed or 32768 color BMPs when I can.

Pat
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform