Determining the current global cursor

  • Thread starter Thread starter Paul Steele
  • Start date Start date
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.
 
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.
 
Back
Top