OSFeature.LayeredWindows 字段
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示分层的、顶级窗口功能。 此字段为只读。
public: static initonly System::Object ^ LayeredWindows;
public static readonly object LayeredWindows;
staticval mutable LayeredWindows : obj
Public Shared ReadOnly LayeredWindows As Object
字段值
示例
以下示例确定当前系统是否支持分层窗口。 基类方法 IsPresent 被调用 作为 LayeredWindows 要查找的功能。 结果显示在文本框中。 此代码假定 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 ( 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 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
注解
操作系统可将分层窗口设为透明或半透明。 Windows 2000 中首次引入了对分层窗口的支持。
若要确定是否安装了分层 Windows 功能,请使用 Feature 属性调用基类方法IsPresentLayeredWindows,作为要查找的功能。
或者,可以通过调用 GetVersionPresent 方法来检查来查看是否安装了该功能,并将 LayeredWindows 作为要查找的功能。