views:

812

answers:

4

I have a timely operation that runs on a background thread. While running, I currently put the cursor in a wait state:

Mouse.OverrideCursor = Cursors.Wait

I just implemented a feature that allows the user to click a "Cancel" button if they're tired of waiting. However, some users may not realize they can do this (despite the cancel button being the only active control during the process) because they mouse cursor is an hourglass.

I've seen programs use a cursor that shows the hourglass and has an arrow pointer attached as well. How to I set the mouse cursor to this state? I looked through the .NET documentation and could not find this cursor.

Thanks!

+2  A: 

I think you should use a "AppStarting" property of "System.Windows.Forms.Cursros" class.

TcKs
+7  A: 
Me.Cursor = Cursors.AppStarting
Martin
+1  A: 

I suspect the "mouse cursor + hourglass" is Cursors.AppStarting. Of course you'd ideally want the normal hourglass for the rest of the UI, and that cursor just for the cancel button, but...

Jon Skeet
A: 

May be you should also change the background colour (or some graphical clue) of the cancel button in order to make the user realize the cancelation is posible .

Javier Suero Santos