Uređivanje

Dijeli putem


OSFeature.LayeredWindows Field

Definition

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

public: static initonly System::Object ^ LayeredWindows;
public static readonly object LayeredWindows;
 staticval mutable LayeredWindows : obj
Public Shared ReadOnly LayeredWindows As Object 

Field Value

Examples

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 = OSFeature::Feature->GetVersionPresent(
         OSFeature::LayeredWindows );
      
      // Prints whether the feature is available.
      if ( OSFeature::Feature->IsPresent( OSFeature::LayeredWindows ) )
      {
         textBox1->Text = "Layered windows feature is installed.";
      }
      else
      {
         textBox1->Text = "Layered windows feature is not installed.";
      }
   }
private void LayeredWindows() {
   // Gets the version of the layered windows feature.
   Version myVersion =
       OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows);

   // Prints whether the feature is available.
   if (OSFeature.Feature.IsPresent(OSFeature.LayeredWindows))
      textBox1.Text = "Layered windows feature is installed.";
   else
      textBox1.Text = "Layered windows feature is not installed.";
}
Private Sub LayeredWindows()
    ' Gets the version of the layered windows feature.
    Dim myVersion As Version = _
       OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows)
       
    ' Prints whether the feature is available.
    If OSFeature.Feature.IsPresent(OSFeature.LayeredWindows) Then
        textBox1.Text = "Layered windows feature is installed."
    Else
        textBox1.Text = "Layered windows feature is not installed."
    End If
End Sub

Remarks

A layered window can be made transparent or translucent by the operating system. Support for layered windows was first introduced in Windows 2000.

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.

Applies to

See also