How do I set my mouse cursor to the hybrid hourglass and arrow in code? (.NET)

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!


Me.Cursor = Cursors.AppStarting

我认为你应该使用“System.Windows.Forms.Cursros”类的“AppStarting”属性。


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

链接地址: http://www.djcxy.com/p/48276.html

上一篇: 检查程序是否引发异常

下一篇: 我如何将鼠标光标设置为代码中的混合沙漏和箭头? (。净)