Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transparent background pictures (not icons)
Message
De
21/08/2006 01:10:56
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01147135
Message ID:
01147184
Vues:
20
>>Hi.
>>I can add icons with transparent backgrounds to my forms as pictures.
>>But when I try to do the same with .bmp, .jpg and even .gif with a transparent background I can't do it because the background never been transparent.
>
>For BMPs you have to provide MSK files to define transparent areas. See Using Picture Masks

Actually that is not completely correct. To get a BMP to appear transparent you need to have the areas you want transparent painted WHITE - RGB(255,255,255). Once you load the bmp into a image control you set the BACKSTYLE property of the image to 0 (Transparent).

Now ALL areas on your BMP that have the colour white will become transparent. Sometimes it gives an odd effect where we also have white in a bitmap eg. Help icon (blue circle with white ?). Here's where the MSK or mask file comes in.

A MSK file is a BMP with its name same as the BMP but with a MSK extension.
HELP.BMP -> HELP.MSK.

What you do is change the areas on your original BMP that are white and that you want to remain opaque, to black. Save As the file using quotes - "HELP.MSK"

Now provided you set the BackStyle = 0 and that there are areas on your BMP that are white, the BMP will appear transparent for those areas that are white that are not MaSKed out by the MSK.

If you can raed tihs snetnece tehn you are not a gniues. Jsut an oidrnray psroen. :)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform