System.Windows.Forms.Form.Opacity Property

Gets or sets the opacity level of the form.

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.OpacityConverter))]
[System.ComponentModel.DefaultValue(1)]
public double Opacity { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The Form.Opacity property enables you to specify a level of transparency for the form and its controls. When this property is set to a value less than 100 percent (1.00), the entire form, including borders, is made more transparent. Setting this property to a value of 0 percent (0.00) makes the form completely invisible. You can use this property to provide different levels of transparency or to provide effects such as phasing a form in or out of view. For example, you can phase a form into view by setting the Form.Opacity property to a value of 0 percent (0.00) and gradually increasing the value until it reaches 100 percent (1.00).

Form.Opacity differs from the transparency provided by the Form.TransparencyKey, which only makes a form and its controls completely transparent if they are the same color as the value specified in the Form.TransparencyKey property.

This property is not supported when Form.RightToLeftLayout is true.

The Form.Opacity property depends on the Layered Windows API that was introduced with Windows 2000. For more information, see the "Layered Windows: A New Way to Use Translucency and Transparency Effects in Windows Applications" in the Platform SDK documentation at tp://msdn.microsoft.com/.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0
Since: .NET 2.0