如何在程序运行时隐藏鼠标?
点击或移动后又出现,就象屏保一样? 问题点数:50、回复次数:7Top
1 楼KentKing()回复于 2000-11-06 03:20:00 得分 0
用API函数 SetCursor
var
OldHCursor: Integer;
...
OldHCursor := SetCursor(nil); //隐藏鼠标并保存当前鼠标句柄
...
然后在你的OnClick或OnMouseMove里恢复
SetCursor(OldHCursor);Top
2 楼KentKing()回复于 2000-11-06 03:34:00 得分 0
sorry,写错一句
>> OldHCursor := SetCursor(0);Top
3 楼KentKing()回复于 2000-11-06 03:41:00 得分 10
哎,完全搞错了。应该用ShowCursor(Boolean) : -)Top
4 楼cybercake(数字蛋糕)回复于 2000-11-06 04:56:00 得分 10
把Cursor属性设成crNone不就行了。Top
5 楼Icebird(冰鸟)回复于 2000-11-06 09:59:00 得分 15
{隐藏鼠标光标}
ShowCursor(False);
{隐藏鼠标光标}
{移动鼠标光标}
SetCursorPos(X,Y);
{移动鼠标光标}Top
6 楼easypaper()回复于 2000-11-06 11:21:00 得分 15
API函数
ShowCursor
The ShowCursor function displays or hides the cursor.
int ShowCursor(
BOOL bShow // cursor visibility
);
Parameters
bShow
[in] Specifies whether the internal display counter is to be incremented or decremented. If bShow is TRUE, the display count is incremented by one. If bShow is FALSE, the display count is decremented by one.
Return Values
The return value specifies the new display counter.
注意:使用ShowCursor(FALSE)
同ShowCursor(TRUE)次数应该相同,否则,可能的不到正确结果。
Top




