Showing a spinner while a Windows Forms program is "processing", similar to ajaxStart/ajaxStop?

The standard Windows Forms way to do that is Cursor.Current = Cursors.WaitCursor;.

Does that work for you, or does it have to be an image?


I am using Visual Studio Enterprise 2015. The suggested cursor styles/types given here, none of them worked with me.

The one that is working with me is:

private async void button_Click(object sender, RoutedEventArgs e)
{
    Cursor = Cursors.Wait; // change cursor to hourglass type
    ThatProcessThatTookVeryLongTime();
    Cursor = Cursors.Arrow; // change cursor to normal type
}

May I add this CodeProject link?

All you need is to build, drag from toolbar and use. The LoadingCircle component works without any trouble at all. Works like a charm, you can even customize it!