How to: Give Your Control a Transparent Background

How to: Give Your Control a Transparent Background

 

In earlier versions of the .NET Framework, controls didn't support setting transparent backcolors without first setting the SetStyle method in the forms's constructor. In the current framework version, the backcolor for most controls can be set to Transparent in the Properties window at design time, or in code in the form's constructor.

System_CAPS_noteNote

Windows Forms controls do not support true transparency. The background of a transparent Windows Forms control is painted by its parent.

System_CAPS_noteNote

The Button control doesn't support a transparent backcolor even when the BackColor property is set to Transparent.

To give your control a transparent backcolor

Show:
© 2016 Microsoft