3

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.

user1410541
  • 51
  • 1
  • 4

1 Answers1

10

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.

Raymond Chen
  • 44,448
  • 11
  • 96
  • 135