Gets or sets the opacity level of the form.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The 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 property to a value of 0 percent (0.00) and gradually increasing the value until it reaches 100 percent (1.00).
differs from the transparency provided by the TransparencyKey, which only makes a form and its controls completely transparent if they are the same color as the value specified in the TransparencyKey property.
This property is not supported when RightToLeftLayout is true.
The 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 http://msdn.microsoft.com.
Windows 2000, Windows 2000 Professional, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional x64 Edition, Windows Server 2003 Platform Note: Supports the Layered Windows API. This property has no effect on platforms that cannot display layered windows. In addition, some display drivers do not support layering.
The following code example demonstrates how to create a form that is displayed with an opacity level of 75 percent. The code example creates a new form that is positioned in the center of the screen with an property set to change the opacity level of the form. The code example also sets the Size property to provide a larger sized form than the default size of the form. This code example was written under the assumption that the method defined in this example is called from another form in an event handler or other method.