如何将鼠标显示成动画鼠标?
''声明:
Option Explicit
Const OCR_NORMAL = 32512
Const IDC_ARROW = 32512&
Private Declare Function LoadCursorFromFile Lib "user32" Alias _
"LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Private Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" _
(ByVal hInstance As Long, lpCursorName As Any) As Long '' modified
Private Declare Function SetSystemCursor Lib "user32" _
(ByVal hcur As Long, ByVal id As Long) As Long
''代码:
Dim hCursor As Long
hCursor = LoadCursorFromFile( 欲显示的 .ani 或 .cur 文件名称 )
Call SetSystemCursor(hCursor, OCR_NORMAL)
若要将鼠标还原原状,则执行以下过程:
hCursor = LoadCursor(0&, ByVal IDC_ARROW)
Call SetSystemCursor(hCursor, OCR_NORMAL)
Tags:
作者:佚名评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论