Frank Davis
Frank Davis

Reputation: 33

WinForm transparent image issue

I have a WinForm and I set a transparent PNG image for the label. In Windows XP, the transparency displays properly, but in Windows 7, the white text (as seen in the example URL below) becomes transparent (it should be solid white). I'm also wondering if there is a way to smooth the edges of the transparent image so it isn't as choppy.

label1.Image = global::WinProgram.Properties.Resources.image_name;

Example:

enter image description here

Upvotes: 0

Views: 562

Answers (1)

DevEstacion
DevEstacion

Reputation: 1967

Due to your limited code, I'd be guessing on this one but i find this very likely to be your problem. In WinForms there is a so called TransparencyKey, I'm guessing that you sett'd the SolidWhite as your TransparencyKey.

You can refer to this post: Transparent Background

Upvotes: 1

Related Questions