共用方式為


OSFeature.LayeredWindows 欄位

定義

表示層次的最上層視窗功能。 此欄位為唯讀。

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

欄位值

範例

下列範例會判斷目前的系統是否支援分層視窗。 基類方法 IsPresent 會以 LayeredWindows 呼叫 作為要尋找的功能。 結果會顯示在文字方塊中。 此程式碼假設 textBox1 已具現化並放在表單上。

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

備註

分層視窗可由作業系統透明或半透明化。 第一次在 Windows 2000 中引進分層視窗的支援。

若要判斷是否已安裝分層視窗功能,請使用 Feature 屬性呼叫 基 LayeredWindows 類方法 IsPresent 做為要尋找的功能。

或者,您可以呼叫 GetVersionPresent 方法 LayeredWindows 作為要尋找的功能,來檢查是否已安裝此功能。

適用於

另請參閱