+ -
当前位置:首页 → 问答吧 → VB如何隐藏鼠标?

VB如何隐藏鼠标?

时间:2011-07-31

来源:互联网

如题,谢谢!

作者: BeckHoff_PLC   发布时间: 2011-07-31

【操作系统】
Win9X:Yes
WinNT:Yes
【说明】
  控制鼠标指针的可视性 
【返回值】
  Long,显示计数(参考注解) 
【其它】
  windows维持着一个内部显示计数;倘若bShow为TRUE,那么每调用一次这个函数,计数就会递增1;反之,如bShow为FALSE,则计数递减1。只有在这个计数大于或等于0的情况下,指针才会显示出来
【参数表】
  bShow ---------- Long,TRUE(非零)显示指针,FALSE隐藏

Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long

VB code

'Example Name:ShowCursor
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Sub Form_Load()
    'KPD-Team 1998
    'URL: http://www.allapi.net/
    'E-Mail: [email protected]
    'Hide the cursor
    ShowCursor 0
    'Wait 10 seconds
    t = Timer
    Do: DoEvents: Loop Until Timer > t + 10
    'Show the cursor
    ShowCursor 1
End Sub




作者: Veron_04   发布时间: 2011-07-31

热门下载

更多