Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Transparent Button Background

Transparent Button Background

Transparent Button Background

Does any one know how to over ride VFP9 RANDOM decision on if it will make my picture on a button have a transparent background.  I had a png picture of a pencil on a button.  Looked great, but was too big.  So I made it smaller, saved it in photoshop and now it has an ugly white background.  Tried to load the original picture and it has the ugly white background too (note. nothing was changed on the button or the original picture!!) Now no matter what I do, I can't get my beautiful original transparent background.

I tested it and the picture has a transparent background on every other application on the planet.  Please help!!

RE: Transparent Button Background

Are you sure that photoshop did not put all that white in there? I have had to select the white and then use inverse and cut only the picture out and save it to a new file to get rid of white space with photoshop.

This old world keeps spinning round - It's a wonder tall trees ain't layin' down

RE: Transparent Button Background


You have two options:

1. Save the picture as a BMP. Make sure the colour depth is 8-bit or less (256 colours or fewer). Use this for your button. You should find that the white areas are now transparent,

2. Save the picture as a GIF. Within your picture editor, mark the background areas as transparent. In VFP, create an image object (not a command button), and set the Picture property to the GIF. You don't have to make the image visible. In fact, you can destroy it as soon as you've created it. Next, go ahead and place the GIF on a command button. You'll see that the transparency is respected.


Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close