IFeatureSupport.GetVersionPresent メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > IFeatureSupport.GetVersionPresent メソッドの意味・解説 

IFeatureSupport.GetVersionPresent メソッド

指定した機能バージョン取得します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Function GetVersionPresent ( _
    feature As Object _
) As Version
Dim instance As IFeatureSupport
Dim feature As Object
Dim returnValue As Version

returnValue = instance.GetVersionPresent(feature)
Version GetVersionPresent (
    Object feature
)
Version^ GetVersionPresent (
    Object^ feature
)
Version GetVersionPresent (
    Object feature
)
function GetVersionPresent (
    feature : Object
) : Version

パラメータ

feature

バージョン要求されている機能

戻り値
指定した機能バージョン番号を表す Version。その機能インストールされていない場合null 参照 (Visual Basic では Nothing)。

解説解説

このメソッド実装については、GetVersionPresent のトピック参照してください

使用例使用例

IFeatureSupport の 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 
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IFeatureSupport インターフェイス
IFeatureSupport メンバ
System.Windows.Forms 名前空間
GetVersionPresent
OSFeature
FeatureSupport クラス


このページでは「.NET Framework クラス ライブラリ リファレンス」からIFeatureSupport.GetVersionPresent メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からIFeatureSupport.GetVersionPresent メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からIFeatureSupport.GetVersionPresent メソッドを検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

IFeatureSupport.GetVersionPresent メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IFeatureSupport.GetVersionPresent メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS