Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using .PNG files instead of .BMP
Message
 
To
16/02/2017 10:49:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Application:
Desktop
Miscellaneous
Thread ID:
01648025
Message ID:
01648060
Views:
160
This message has been marked as the solution to the initial question of the thread.
>Hi, I'm finishing doing an upgrade to an application I developed near a decade. So they asked me to change the icon set (.bmp files) for all my buttons and menus so the users recognize the changes visually also. I was searching on the Internet for icon sets but I find them mostly in .png format, I tried some of them but when I use them in my application, the transparent regions of the pictures turn into black or white in some cases, so I would have to edit them and save them in .bmp format and adding a .msk file for white regions. I have a lot of icons (.bmp) but I don't want to waste my time editing the .png icons. Is there a way to use .png pictures in my application without having to edit and changing all of them into .bmp files?
>
>TIA

Take a look at this blog post I wrote some time ago:

https://www.west-wind.com/wconnect/weblog/ShowEntry.blog?id=883

You can preload PNG images to get transparency to work. I use re-usable routine I put in the load event of each image that requires transparency to handle this.

There are a few odd refresh cases where the transparency still gets lost (like unloading VFP resources) but it's very rare.


+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform