bulltorious bulltorious -5 years ago 493
Ajax Question

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

Yes, yes. I know they are 2 completely different technologies. I recently moved over to FAT development with C# and Windows Forms from web development. I always thought it was very easy to show a spinner using ajaxStart and ajaxStop, so the user knows something is occurring and to continue waiting.

Is there an equivalently simple technique for C# Windows Forms that can be implement globally? For example, if I am querying a DB and waiting for some results, normally the program becomes unresponsive for a few seconds and then starts working again after "processing". Is there some global way I can display a spinner while my program is "processing" instead of identifying all possible points in the program that could cause it to become unresponsive and just ripping off new threads?

Please let me know if I am being unclear.

Answer Source

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?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download