In the .NET Framework System.Windows.Forms namespace, there are many ways to set cursors:
- Control.UseWaitCursor, which also applies to the Form class
- Control.Cursor, which also applies to the Form class
CONSIDER indicating activity of an operation by showing the wait cursor. This provides feedback to the user that the operation started and is still in progress. This should be included by default in all UI event handlers, because the duration of an operation depends on many factors outside of the programmer’s control, e.g. file access over the network.
DO NOT use the Cursor property to signal a long-running application. This property should be used only to change the cursor to indicate the action that is currently available for the control, e.g. a hand (for panning) or I-beam (to edit text).
DO use Cursor.Current = Cursor.WaitCursor before you’re starting a long-running operation that does not involve user interface changes and the cursor should change immediately. The cursor will be reset automatically as soon as the current thread returns to it’s message loop.
DO set UseWaitCursor to true when the target control, form, or, most commonly, the entire application execute a possibly long-running operation that involves one or more user interface changes or intermediate windows such as a progress dialog, or operations that indicate progress and completion using events. Note, that the cursor is not changed until the thread returns to the message loop. Note, that new forms do not inherit the UseWaitCursors value from Application.