Sometimes the framework will throw an exception if you try to set the bg color to be transparent. This is because the Control doesn’t support transparent colors. To work around this you should call this method from within the Control:
[C#]
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
[VB.Net]
Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Depending on the Control, you might also have to perform some custom drawing, then.
Share with