Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transparent GIF images
Message
 
 
À
14/07/2006 16:51:37
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01114632
Message ID:
01137961
Vues:
23
Hi Joel

Thats a much cleaner way of solving the problem.

Thx

>FYI, I came up with a generic solution to this problem. Put the code below in FixTransparency.prg, then call FixTransparency(This) from the Init() of your CommandButton (or any other applicable) class. Works like a charm!
>
>* Fix Image Transparency
>* VFP/GDI+ has a bug where image transparency is not respected on buttons
>* The solution is to load the picture in an image control first
>* This program clears the image from cache and reloads it in an image control
>Lparameters loControl as CommandButton
>Local lcPicture, loImage as Image
>
>* Only applies to formats that support transparency
>lcPicture = loControl.Picture
>If Empty(lcPicture) or !InList(Upper(JustExt(lcPicture)),"JPG","PNG","GIF")
>    Return
>EndIf
>
>* Clear image from cache
>loControl.Picture = ""
>Clear Resources (lcPicture)
>
>* Reload picture in Image control
>loImage = CreateObject("Image")
>loImage.Picture = lcPicture
>
>* Reset Picture on control
>loControl.Picture = lcPicture
>
>
>>Hi!
>>
>>How do I get foxpro to use my transparent GIF image in my button , IE it has a white background but when I open it in my graphics package, it shows no background & tells me it is transparent?
>>
>>Any help extremley appreciated
>>
>>TAI
Rob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform