FeatureSupport クラス
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


機能情報を問い合わせるクラスが IFeatureSupport インターフェイスを実装している場合は、このクラスの static メソッドを使用します。それ以外の場合は、FeatureSupport から継承して、ユーザー独自の実装を指定します。このクラスの実装については、OSFeature のトピックを参照してください。
機能のバージョンを取得するには GetVersionPresent を呼び出します。特定の機能または機能のバージョンがインストールされているかどうかを判断するには、IsPresent を呼び出します。
継承時の注意 FeatureSupport から継承する場合は、GetVersionPresent メソッドをオーバーライドする必要があります。このメソッドをオーバーライドする場合は、feature パラメータで使用するクラスと IsPresent メソッドのこのパラメータで使用するクラスが同じかどうかを確認してください。2 つの feature パラメータが異なる場合は、IsPresent もオーバーライドする必要があります。
FeatureSupport の OSFeature 実装を使用し、LayeredWindows 機能の有無を問い合わせる例を次に示します。機能が存在するかどうかを確認するには、バージョンが null 参照 (Visual Basic では Nothing) かどうかを調べます。結果はテキスト ボックスに表示されます。このコードは、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 Not (myVersion Is Nothing) Then textBox1.Text = "Layered windows feature is installed." & _ ControlChars.CrLf Else textBox1.Text = "Layered windows feature is not installed." & _ ControlChars.CrLf End If 'This is an alternate way to check whether a feature is present. If OSFeature.Feature.IsPresent(OSFeature.LayeredWindows) Then textBox1.Text &= "Again, layered windows feature is installed." Else textBox1.Text &= "Again, 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 (myVersion != null) textBox1.Text = "Layered windows feature is installed." + '\n'; else textBox1.Text = "Layered windows feature is not installed." + '\n'; // This is an alternate way to check whether a feature is present. if (OSFeature.Feature.IsPresent(OSFeature.LayeredWindows)) textBox1.Text += "Again, layered windows feature is installed."; else textBox1.Text += "Again, 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 ( myVersion != nullptr ) { textBox1->Text = "Layered windows feature is installed.\n"; } else { textBox1->Text = "Layered windows feature is not installed.\n"; } // This is an alternate way to check whether a feature is present. if ( OSFeature::Feature->IsPresent( OSFeature::LayeredWindows ) ) { textBox1->Text = String::Concat( textBox1->Text, "Again, layered windows feature is installed." ); } else { textBox1->Text = String::Concat( textBox1->Text, "Again, 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 (myVersion != null) { textBox1.set_Text("Layered windows feature is installed." + '\n'); } else { textBox1.set_Text("Layered windows feature is not installed." + '\n'); } // This is an alternate way to check whether a feature is present. if (OSFeature.get_Feature().IsPresent(OSFeature.LayeredWindows)) { textBox1.set_Text(textBox1.get_Text() + "Again, layered windows feature is installed."); } else { textBox1.set_Text(textBox1.get_Text() + "Again, layered windows feature is not installed."); } } //LayeredWindows

System.Windows.Forms.FeatureSupport
System.Windows.Forms.OSFeature


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


FeatureSupport コンストラクタ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


FeatureSupport メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | GetVersionPresent | オーバーロードされます。 システムで使用できる指定した機能のバージョンを取得します。 |
![]() | IsPresent | オーバーロードされます。 指定した機能がシステムにインストールされているかどうかを判断します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

FeatureSupport メンバ
現在のシステムから機能情報を取得するための static メソッドを用意します。
FeatureSupport データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | FeatureSupport |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | GetVersionPresent | オーバーロードされます。 システムで使用できる指定した機能のバージョンを取得します。 |
![]() | IsPresent | オーバーロードされます。 指定した機能がシステムにインストールされているかどうかを判断します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

Weblioに収録されているすべての辞書からFeatureSupportを検索する場合は、下記のリンクをクリックしてください。

- FeatureSupportのページへのリンク