Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transparent Pictures in List/combo Boxes
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00119993
Message ID:
00120341
Views:
26
>>This is a tip really :-)
>>I was very pleased to find a solution to transparent bitmaps in listboxes.
>>I couldn't find it documented, but I created a mask (.msk) file for each bitmap that I use in list boxes and - voila - the bitmap displays transparently in both the highlighted and non-highlighted bars. Just like on command buttons.
>>Gotta remember to add the .msk file to the project though. (A mask file is simply a copy of the bitmap file with all the non-transparent areas coloured black)
>>
>>Thank you, VFP team
>
>
>Hi David,
>
>I have several bitmaps that I would like to use in my app that I couldn't because of that exact problem. How do you create a .msk file from a .bmp?
>Can you do this in paint, or do you need a special graphics handler package to create it? Thanks for any information!
>
>John.

Paint.exe is just fine!
Here's what I do.
Open the .bmp. Choose "Save as..."
Lets say we have mybmp.bmp, I save as "mybmp.msk" - you must include the quote, or it will be saved as mybmp.msk.bmp!!!! :-)
Then replace all the areas you don't wan't to be transparent (usually colored pixels) with black and replace all the areas you want to be transparent with white. The eye dropper/color replacer(right button on eraser) tool works just great for this.
Then choose "Save" and save with the .bmp file.
Add both the .bmp and the .msk file to your project.
HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform