This documentation is archived and is not being maintained.

Creating Transparent Windows Forms

Visual Studio .NET 2003

With Microsoft Windows XP, you can control the opacity of windows that are displayed. To make a form more transparent, adjust its Opacity property.

Note   As transparent forms are only supported in Windows 2000 or later, Windows Forms will be completely opaque when run on older operating systems, such as Windows 98, regardless of the value set for the Opacity property.

To control the opacity of Windows Forms

  • In the Properties window, set the Opacity property to a value between 0.0 (complete transparency) and 1.0 (complete opacity).

To control the opacity of Windows Forms programmatically

  • In a method, set the Opacity property to a percentage between 0.0 (complete transparency) and 1.0 (complete opacity). The Opacity property is a Double value type.
    ' Visual Basic
    Public Sub MakeSeeThru()
       frmTransparentForm.Opacity = 0.83
    End Sub
    
    // C#
    public void MakeSeeThru()
    {
       frmTransparentForm.Opacity = 0.83;
    }
    
    // C++
    public:
       void MakeSeeThru()
       {
          frmTransparentForm->Opacity = 0.83;
       }
    

See Also

Introduction to Windows Forms | Creating Windows Forms | Dialog Boxes in Windows Forms

Show: