Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试编写一个简单的 C# win32 控制台应用程序,它使用 ShowCursor (user32.dll) 来隐藏系统鼠标。调用 ShowCursor(false) 返回 -1(应该如此),但鼠标光标仍然存在。使用 ShowCursor(true) 再次调用返回 1(但没有可见效果,因为光标从未消失)。
谢谢。
ShowCursor当鼠标在您的线程创建的窗口上时会影响鼠标。您的控制台应用程序可能没有创建任何窗口,因此ShowCursor没有任何效果。
ShowCursor