OSFeature.Feature 속성

정의

기능 쿼리에 사용할 OSFeature 클래스의 static 인스턴스를 가져옵니다. 이 속성은 읽기 전용입니다.

public:
 static property System::Windows::Forms::OSFeature ^ Feature { System::Windows::Forms::OSFeature ^ get(); };
public static System.Windows.Forms.OSFeature Feature { get; }
static member Feature : System.Windows.Forms.OSFeature
Public Shared ReadOnly Property Feature As OSFeature

속성 값

OSFeature 클래스의 인스턴스입니다.

예제

다음 예제에서는 기능에 대해 쿼리합니다 OSFeatureLayeredWindows . 버전을 확인 하는 경우 확인 null을 기능이 있는지 여부를 결정 합니다. 결과 텍스트 상자에 표시 됩니다. 이 코드에서는 가정 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 ( myVersion != nullptr )
      {
         textBox1->Text = "Layered windows feature is installed.\n";
      }
      else
      {
         textBox1->Text = "Layered windows feature is not installed.\n";
      }
   }
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";
}
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 (myVersion IsNot Nothing) Then
        textBox1.Text = "Layered windows feature is installed." & _
           ControlChars.CrLf
    Else
        textBox1.Text = "Layered windows feature is not installed." & _
           ControlChars.CrLf
    End If
End Sub

설명

static 속성을 사용하여 운영 체제 기능을 쿼리합니다. 이 클래스의 instance 만들 수 없습니다.

기능의 버전을 확인하려면 메서드를 호출합니다 GetVersionPresent . 기능 또는 특정 버전이 있는지 확인하려면 메서드를 IsPresent 호출하고 이 클래스에 제공된 기능 식별자를 사용하여 찾을 기능을 지정합니다.

적용 대상

추가 정보