作者leicheong (睡魔)
看板Programming
标题Re: [讨论] 这是什麽鬼啊(游标.hide())(VB.NET)
时间Sun Sep 30 12:33:08 2007
※ 引述《wahaha99 (成为乡民中道的力量)》之铭言:
: Windows.Forms.Cursor.Hide() 下n次
: Windows.Forms.Cursor.Show() 就要跟着下n次 才会重新显示游标
: 反之亦然
: 这是什麽鬼$@#$%^ !?
: 该不会只有我的电脑这样吧!?
Documentation有写的...
Remarks
The Show and Hide method calls must be balanced. For every call to the Hide
method there must be a corresponding call to the Show method.
因为Windows API中的ShowCursor()也是这样:
The ShowCursor function displays or hides the cursor.
Syntax
int ShowCursor( BOOL bShow);
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 Value
The return value specifies the new display counter.
Remarks
This function sets an internal display counter that determines whether the
cursor should be displayed. The cursor is displayed only if the display count
is greater than or equal to 0. If a mouse is installed, the initial display
count is 0. If no mouse is installed, the display count is –1.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 58.152.217.222
1F:推 wahaha99:不明白...这样做的用意为何 218.166.56.185 09/30 12:40
2F:→ TonyQ:有时候会需要这种机制的 59.115.77.252 09/30 13:10