user1410541
user1410541

Reputation: 61

ShowCursor not working

i'm trying to write a simple C# win32 console app that uses ShowCursor (user32.dll) in order to hide the system mouse. calling ShowCursor(false) returns -1 (as it should), but the mouse cursor remains. calling again with ShowCursor(true) returns 1 (but with no visible effect since the cursor never disappeared).

thanks.

Upvotes: 3

Views: 4084

Answers (1)

Raymond Chen
Raymond Chen

Reputation: 45172

ShowCursor affects the mouse when it is over a window that was created by your thread. Your console application probably did not create any windows, so ShowCursor has no effect.

Upvotes: 10

Related Questions