OSFeature.LayeredWindows フィールド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


レイヤード ウィンドウは、オペレーティング システムによって透明または半透明にできます。レイヤード ウィンドウは、Windows 2000 で初めて導入されました。詳細については、http://msdn.microsoft.com にあるプラットフォーム SDK に関するドキュメントの「Layered Windows: A New Way to Use Translucency and Transparency Effects in Windows Applications」を参照してください。
レイヤード ウィンドウ機能がインストールされているかどうかを確認するには、Feature プロパティを使用し、検索対象の機能を LayeredWindows に設定した基本クラスのメソッド IsPresent を呼び出します。
または、検索対象の機能を LayeredWindows に設定した GetVersionPresent メソッドを呼び出しても、この機能がインストールされているかどうかを確認できます。
Windows 2000, Windows 2000 Professional, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional x64 Edition, Windows Server 2003 プラットフォームメモ : これらのプラットフォームはレイヤード ウィンドウ API をサポートしています。ただし、一部のディスプレイ ドライバはレイヤ表示をサポートしていません。

現在のシステムがレイヤード ウィンドウをサポートしているかどうかを確認する例を次に示します。検索対象の機能として 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
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 void LayeredWindows() { // Gets the version of the layered windows feature. Version myVersion = OSFeature.get_Feature().GetVersionPresent (OSFeature.LayeredWindows); // Prints whether the feature is available. if (OSFeature.get_Feature().IsPresent(OSFeature.LayeredWindows)) { textBox1.set_Text("Layered windows feature is installed."); } else { textBox1.set_Text("Layered windows feature is not installed."); } } //LayeredWindows

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- OSFeature.LayeredWindows フィールドのページへのリンク