Button image

G

Guest

Hi,

I have a round image and have set it to be the button's image. I also set
the backcolor as Transparent. When I run the form, the image looks good but
it has a square box aound that is not transparent.

How can I get the square box to be transparent?

Thanks for your help

Ben
 
P

Pritcham

Hi

Is there a border/frame property for the image (not at my development
machine at the moment so can't look) - this may be what's causing a
visible border.

HTH
 
G

Guest

Hi Martin,

Under FlatAppearance there is a BorderSize, I set it to zero but no luck.

Thanks for your help

Ben
 
R

Rimmer

Hi Ben,

what type of image are you working with gif/jpg/bmp ?
has it been created with a proper transparent background (alpha
channel)?

Anthoney
 
F

FUnky

Try the following for the button :
BackColor = Transparent
FlatAppearance.BorderColor = Control
FlatAppearance.BorderSize = 0
FlatStyle = Flat
 
G

Guest

Hi Anthoney

I have tried jpg, gif, and png. They do have a transparent background.

Thanks

Ben
 
G

Guest

FUnky,

I tried the setting below but no luck.

After looking around it looks like my problem has to do with putting an
image over another image. The top most image is using the form background as
its transparency instead on the image that is directly behind it.

Any ideas how on this?

Thanks for your help.

Ben
 
R

Rimmer

Hi Ben,

well the jpg will never work as it does not support transparency.
but the png should be all good (and the best quality option as it
supports partial transparency).

I may have not understood your problem, there are two different options
you may be looking to achieve. Can you tell me which?
a) You want to show an image that is round as the complete button, with
no button square border or text.
or
b) You want to show a button with a round image contained inside it.
The button still has it's square shape.

If a is your desired option, I suggest using a picture box (background
set to transparent) and capturing the click of the picture box the same
as the click of a button. Also set the cursor for the picture box to
the 'hand' as happens for a button.

if b, it should be working without a problem.

Does this help?

Anthoney
www.nowpromote.com.au
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top