WaitCursor 类

当实例存在时,显示等待光标,释放完毕时恢复原始光标。

继承层次结构

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

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

语法

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

WaitCursor 类型公开以下成员。

构造函数

  名称 说明
公共方法 WaitCursor 每当鼠标指针指定在的用户接口控件,存储当前光标并显示等待光标。当释放某个实例时,当前光标将还原。

页首

方法

  名称 说明
公共方法 Clear 还原原始光标。通常不必调用此显示。
公共方法 Dispose 还原原始光标。这会自动发生在使用块的末尾。
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 Finalize 确保对象释放时,游标清除。 (重写 Object.Finalize()。)
公共方法 GetHashCode 作为默认哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

备注

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

示例

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

线程安全

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

请参阅

参考

Microsoft.VisualStudio.Modeling.Shell 命名空间