次の方法で共有


OSFeature.LayeredWindows フィールド

レイヤード トップレベル ウィンドウ機能を表します。このフィールドは読み取り専用です。

Public Shared ReadOnly LayeredWindows As Object
[C#]
public static readonly object LayeredWindows;
[C++]
public: static Object* LayeredWindows;
[JScript]
public static var LayeredWindows : Object;

解説

レイヤード ウィンドウは Windows 2000 だけで利用でき、オペレーティング システムによって透明または半透明にすることができます。

レイヤード ウィンドウ機能がインストールされているかどうかを確認するには、 Feature プロパティを使用し、検索対象の機能を OSFeature.LayeredWindows に設定した基本クラスのメソッド IsPresent を呼び出します。

または、検索対象の機能として OSFeature.LayeredWindows を指定し、 FeatureGetVersionPresent メソッドを呼び出しても、この機能がインストールされているかどうかを確認できます。

使用例

[Visual Basic, C#, C++] 現在のシステムがレイヤード ウィンドウをサポートしているかどうかを確認する例を次に示します。検索対象の機能として OSFeature.LayeredWindows を指定し、基本クラスのメソッド IsPresent が呼び出されます。結果はテキスト ボックスに表示されます。このコードは、 textBox1 がインスタンス化され、フォーム上に配置されていることを前提にしています。

 
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


[C#] 
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.";
}


[C++] 
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 = S"Layered windows feature is installed.";
    else
       textBox1->Text = S"Layered windows feature is not installed.";
 }
 

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

OSFeature クラス | OSFeature メンバ | System.Windows.Forms 名前空間 | IsPresent | GetVersionPresent | Feature