0

I have a WinForm in C#, I have both BackCOlor and TransparencyKey set to color "Lime". If I compile at this point the form is transparent. Then I added an BackgroundImage with a Lime background (#00ff00), but the Lime on the image is not transparent.

How can I get the background image to have a transparent background too?

The image I used is a .bmp

slemdx
  • 1,055
  • 2
  • 16
  • 19

3 Answers3

0

Use an image format that supports transparency such as PNG.

tcables
  • 1,231
  • 5
  • 16
  • 36
0

It works for me. Are you sure that the BMP has exactly the same background color as your form, and that it has not been altered some way, perhaps by a reduction in the number of colors or something similar?

LazyOfT
  • 1,428
  • 7
  • 20
0

I'm pretty sure the Lime color in the picture is not identical to Lime you set as TransparencyKey.

Use ColorPicker: http://www.iconico.com/download.aspx?app=ColorPic&type=free

over your picture to see what color code the lime in the picture has: e.g. #XXXXXX. Then put that number in TransparencyKey, don't just use "Lime".

Liviu Trifoi
  • 2,980
  • 1
  • 21
  • 28