SharpAffair
SharpAffair

Reputation: 5478

Change global mouse cursor in .NET

I need ability to modify the cursor while my application is running, and restore it afterwards.

Cursor.Current doesn't seem to work.

Upvotes: 1

Views: 544

Answers (2)

spidergeuse
spidergeuse

Reputation: 3

Well you could try something like this (changing from with a running instance of a form in your application)

            this.Cursor = Cursors.Cross;

and reset it back to default using

            this.Cursor = Cursors.Default;

The Cursors class holds various Cursor objects you could use

Upvotes: 0

SharpAffair
SharpAffair

Reputation: 5478

I found out it's not a good idea to change the cursor globally. Instead I decided to follow the actual cursor via hooks, and draw my object around it.

Upvotes: 1

Related Questions