WaitCursor 类

显示等待光标,当实例存在,然后恢复原始光标,则在配置时。

继承层次结构

System.Object
  Microsoft.VisualStudio.Modeling.Shell.WaitCursor

命名空间:  Microsoft.VisualStudio.Modeling.Shell
程序集:  Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0.dll 中)

语法

声明
Public NotInheritable Class WaitCursor _
    Implements IDisposable
public sealed class WaitCursor : IDisposable

WaitCursor 类型公开以下成员。

构造函数

  名称 说明
公共方法 WaitCursor 存储当前光标并显示等待光标,每当鼠标指针在指定的用户界面 (ui) 控件。当实例时,将还原当前光标。

页首

方法

  名称 说明
公共方法 Clear 还原原始光标。显式调用此不经常需要的。
公共方法 Dispose 还原原始光标。这发生在中关闭时自动使用块。
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

备注

此类设计用于 “using 语句。 在下面的示例中,等待光标,将会显示在封闭块时,,每当鼠标在指定的控件。

示例

using (WaitCursor w = new WaitCursor(control)) 
{/* wait cursor displayed over control while execution is in here */}

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.VisualStudio.Modeling.Shell 命名空间