Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transparent Image
Message
De
24/06/2009 00:35:35
 
 
À
16/06/2009 02:37:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01406278
Message ID:
01407942
Vues:
51
>Hi All,
>
>I have placed an image on my applications desktop. How can I make parts of the image transparent so that the underlying desktop colour shows through?
>
>TIA

When you say "transparent" do you mean fully transparent? If so, just make the areas of you image you want to be fully transparent to be white - RGB(255,255,255) and save the file as a BMP.

Add it to an image control on the form and set the BackStyle = 0 (Transparent). Then all areas on your BMP that are RGB(255,255,255) will be transparent.

If on the other hand you want to make parts of the image translucent, such that altthough the form and underlying objects show thru. the image itself also shows, like a smoky glass effect. For this you need to save your file as a PNG and set an Alpha Mask. This can be done with most paint programs. When you are done, just add the PNG to an image control. The unmasked parts will be transparent.

Finally if you want to keep white on your image (white areas should not be transparent) then you have to use GDI+x to make another colour transparent instead of white. This you can read about here:

http://weblogs.foxite.com/bernardbout/archive/2008/09/30/6947.aspx

Bernard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform