WaitCursor Class

 

Displays the Wait cursor while an instance exists, and restores the original cursor when it is disposed.

Namespace:   Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll)

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

public sealed class WaitCursor : IDisposable

NameDescription
System_CAPS_pubmethodWaitCursor(Control)

Stores the current cursor and displays the wait cursor whenever the mouse pointer is over the specified user interface control. When the instance is disposed, the current cursor will be restored.

NameDescription
System_CAPS_pubmethodClear()

Restore the original cursor. It is not normally necessary to call this explicitly.

System_CAPS_pubmethodDispose()

Restore the original cursor. This happens automatically at the end of a using block.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

This class is designed to be used with the 'using' statement. In the following example, the wait cursor will be displayed while the enclosed block is being executed, whenever the mouse is over the specified control.

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: