Export (0) Print
Expand All

OSFeature.LayeredWindows Field

Represents the layered, top-level windows feature. This field is read-only.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public static readonly Object LayeredWindows

A layered window can be made transparent or translucent by the operating system. Support for layered windows was first introduced in 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.

To determine if the layered windows feature is installed, use the Feature property to call the base class method IsPresent with LayeredWindows as the feature to look for.

Alternatively, you can check to see if the feature is installed by calling the GetVersionPresent method with LayeredWindows as the feature to find.

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. Note however, that some display drivers do not support layering.

The following example determines whether the current system supports layered windows. The base class method IsPresent is called with LayeredWindows as the feature to look for. The result is displayed in a text box. This code assumes textBox1 has been instantiated and placed on a form.

private void LayeredWindows() {
   // Gets the version of the layered windows feature.
   Version myVersion =

   // Prints whether the feature is available. 
   if (OSFeature.Feature.IsPresent(OSFeature.LayeredWindows))
      textBox1.Text = "Layered windows feature is installed.";
      textBox1.Text = "Layered windows feature is not installed.";

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

Community Additions

© 2015 Microsoft