NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

OSFeature.feature

Specifies the static (in Visual Basic Shared) instance of OSFeature to use for feature queries. This field is read-only.

[Visual Basic]
Public Shared ReadOnly feature As OSFeature
[C#]
public static readonly OSFeature feature;
[C++]
public: static readonly OSFeature* feature;
[JScript]
public static var feature : OSFeature;

Remarks

Use this instance of OSFeature to query for operating system features.

You cannot create an instance of this class.

Example [Visual Basic]

The following example queries OSFeature for the LAYERED_WINDOWS feature. The version is checked to see if it is a null reference (in Visual Basic Nothing) to determine whether the feature is present. The result is displayed in a text box. This code assumes Button1 and TextBox1 have been instantiated.

[Visual Basic]

Private Sub LayeredWindows()
   'Get the version of the layered windows feature.
   Dim myVersion As Version
   myVersion = OSFeature.feature.GetVersionPresent(OSFeature.LAYERED_WINDOWS)

   'Print whether the feature is available.
   If (myVersion = Nothing) Then
      TextBox1.Text = "Layered windows feature is not installed."
   Else
      TextBox1.Text = "Layered windows feature is installed."
   End If
End Sub

See Also

OSFeature Class | OSFeature Members | System.WinForms Namespace | System.WinForms.Version | FeatureSupport | OSFeature