Determining the current global cursor

P

Paul Steele

Is there any way in C#/.NET to determine what the current global cursor is
being displayed? The .Net method Cursor.Current only applies to the running
application. I want to access the cursor even when my program is not in
control. I've done some reading and the best I've come across is the Windows
API call GetCursorInfo. This returns a struct that has some useful info such
as cursor position, but I don't see any way to determine from the
information what type of cursor is currently being displayed. One of the
struct's members is the handle to the current cursor, but I haven't been
able to find what the handle actually points to. Any tips would be
appreciated.
 
N

Nicholas Paldino [.NET/C# MVP]

Paul,

You can call the GetIconInfo function through the P/Invoke layer,
passing the cursor handle as a parameter to get the information about it.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top