Re: [討論] 這是什麼鬼啊(游標.hide())(VB.NET)

看板Programming作者 (睡魔)時間18年前 (2007/09/30 12:33), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串2/3 (看更多)
※ 引述《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

09/30 12:40, , 1F
不明白...這樣做的用意為何
09/30 12:40, 1F

09/30 13:10, , 2F
有時候會需要這種機制的
09/30 13:10, 2F
文章代碼(AID): #16_oS5Bf (Programming)
文章代碼(AID): #16_oS5Bf (Programming)