WaitCursor Class

IIS 7.0
 

Provides a convenience class for displaying a wait cursor (typically an hourglass shape) during a lengthy operation.

Namespace:   Microsoft.Web.Management.Client.Win32
Assembly:  Microsoft.Web.Management (in Microsoft.Web.Management.dll)

System.Object
  Microsoft.Web.Management.Client.Win32.WaitCursor

[SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
public sealed class WaitCursor : IDisposable

NameDescription
System_CAPS_pubmethodWaitCursor()

Initializes a new instance of the WaitCursor class.

NameDescription
System_CAPS_pubmethodDispose()

Releases all resources used by the WaitCursor class.

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.)

You should define the scope of a lengthy operation with the using statement so the default cursor will be automatically restored when the operation is complete.

The following example displays a WaitCursor object while the user settings are saved.

private void butClickSaveSettings(object sender, EventArgs e) {

    using (new WaitCursor()) {
        SaveSettings();
    }
} 

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: