Question How to get the Current Cursor (Globally) ?!

mlibary

New member
Joined
Apr 17, 2011
Messages
1
Programming Experience
3-5
Hi everybody;

I just want to know how can I get the Current Cursor state (Hand or IBeam or ... etc).
I know that the
VB.NET:
Cursor.Current.Tostring
will work ! ..
But it works only inside my form ! .. I want to get it outside at any window.

Thank you in advance;
 
You must use GetCursorInfo platform function to get the global cursor, then load a Cursor object with returned cursor handle. ToString will throw an exception if current cursor is a custom cursor.
Declarations for example from here: pinvoke.net: getcursorinfo (user32) (use online code converter)
 
Back
Top