Reputation: 15
I have tried many ways to have a transparent background on my form. Transparency key does work, but problems arise when you put images that have opacity. I tried to override OnPaintBackground
which only removed my background image. And I tried the SetStyle
method.
Upvotes: 0
Views: 1619
Reputation: 1170
You can set opacity of the form.100% is default for Windows form and lower values are more transparent.
Upvotes: 0
Reputation: 4330
Assuming you are using windows forms, try:
this.TransparencyKey = Color.Red;
this.BackColor = Color.Red;
when you have a color on the form which is the same as your transparency key, then it will be transparent. on the other hand, by that the red color is assigned for transparency only, you won't be able to use it.
(and this
refers to the form)
Upvotes: 2