Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I hate the button images.. grrrrr 1

Status
Not open for further replies.

EzLogic

Programmer
Aug 21, 2001
1,230
US
images are transparent.
tried png, gif, etc..

i even tried Mike Lewis suggestions, to create a image control, set it to transparent, destroy it, then do the button pic. it works ok, the button pic looked transparent, looks good.

then, compile, run the app, nope. has a white background.

go to the button class again in development, and behold, its white background strikes again, while the image on the form is still transparent!!

how did you make your button pics transparent? this is so frustrating.


Ali Koumaiha
TeknoSoft Inc.
Michigan
 
What version of VFP?
In VFP9 if your picture is BMP and have white RGB(255,255,255) background this picture is transparent. But if it is NOT a pure white ...

Borislav Borissov
VFP9 SP2, SQL Server 2000,2005 & 2008.
 
Gimp saved PNG with alpha channel work ok for me, without a MSK or white pixels, in fact you can even use white pixels and they don't get transparent.

VFP9, at least SP1 needed, in VFP8 PNG support was limited, not including alpha and in 9 a bug was removed with SP1.

But GIF should work even in VFP7.

Bye, Olaf.
 
Ali,

The simplest solution is to use BMPs. Decide which areas you want to be transparent, and make them white. It's as simple as that.

If you put the image on a button, you will get the transparency. If you put it in an Image control, it will also give you the transparency, provided you set the control's BackStyle to transparent.

One other point: When you are testing your images in the development environment, be sure to CLEAR RESOURCES after editing the image, otherwise you will see the cached copy.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top