Share via


How to get current cursor type in C#

Question

Thursday, July 19, 2012 12:32 PM

Hi all,

I want to get current cursor type in my application using C#.

If anyone knows,please help me out.

Thank you

All replies (3)

Thursday, July 19, 2012 12:41 PM ✅Answered

I don't know if this is simply what you want, but here you go. This will yield the string: [Cursor: Default] or what ever it may be.

this.Cursor.ToString()

Monday, July 23, 2012 9:15 AM ✅Answered

Use this link

http://social.msdn.microsoft.com/Forums/en/winforms/thread/e166aeb6-4900-4394-a4e9-f1e64d8bafa5

Sivalingam


Monday, July 23, 2012 10:24 AM | 1 vote

I think you want to compare Cursor Cursor Type with predefined ones and change the type to other one right?

you can do comparison as below,

if (this.Cursor.Equals(Cursors.Hand))
{
     this.Cursor = Cursors.Default;
}

I hope this is what you are looking for.

Please mark this post as answer if it solved your problem. Happy Programming!