Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transparent Image
Message
From
11/07/2009 14:34:23
 
 
To
24/06/2009 00:35:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01406278
Message ID:
01411620
Views:
53
>>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

Hello Bernard and All,

Thanks for the information and sorry for the delay in reply. I have tried the above but this does not seem to work for displaying an image on the desktop. I want parts of the image (the white part for example) to allow the desktop colour to show through. I can use any image format, bmp, png, etc. I am using _screen.addobject() to add the image to the desktop. Any other ideas?
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform