C# How can I hide the cursor in a winforms app?
14,349
I knew this was a stupid question! Simply put
Cursor.Hide();
is all I needed in the forms constructor.
Related videos on Youtube
Comments
-
TK. about 2 years
Im developing a touchscreen app and I need to hide the cursor whenever it is within the main Form.
Any ideas?
-
aku over 15 yearsare you sure about "this.Cursor" AFAIK you should use static Cursor class i.e. Cursor.Hide()
-
TK. over 15 yearsYou are correct ... a typo on my part it should be 'Cursor.Hide();' without the this.
-
BrainSlugs83 over 10 yearsHow do you toggle it? Calling the methods outside of the form's constructor don't seem to have any effect. :-/
-
TaW almost 7 yearsIt should be noted that Cursor.Hide(); and Cursor.Show(); need to be balanced!!!