Type POINTAPI x As Long y As LongEnd TypeDeclare Function GetCursorPos Lib "user32" Alias "GetCursorPos" _ (lpPoint As POINTAPI) As Long'隐藏MousePublic Sub toHideCursor()ShowCursor 0End Sub'显示MousePublic Sub toShowCursor()ShowCursor 1End Sub
我们经常在影像播放器和系统进入屏幕保护时看不到鼠标,这是因为系统刻意将鼠标隐藏起来的原因。这种隐藏Mouse的功能其实并不难,我们利用Visual Basic的API函数ShowCursor即可轻松实现,只需要编写程序如下代码即可: Public Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long Public&nb...[ 查看全文 ]
'在Project中加入一个Module,然后在其中加入以下代码:Option ExplicitType LARGE_INTEGER lowpart As Long highpart As LongEnd TypePublic Declare Function QueryPerformanceCounter Lib "kernel32" _ (lpPerformanceCount As LARGE_INTEGER) As LongPublic Declare Function QueryPerformanceFrequency Lib "kernel32" _ (lpFrequency As LARGE_INTEG...[ 查看全文 ]
代码如下: /* * Copyright (c) 2010 刘建华 * * The above copyright notice shall be * included in all copies or substantial portions of the Software. * Example: divdemo/div divdemo/div script type="text/javascript" var o = $(document); o.mousemove( function(e){ var d = document.getElementById("demo"); d.style.left = ($.mouse(e).left + 5) + "px"; d.style.top = ($....[ 查看全文 ]