Visual Basic 6.0 鼠标、键盘与文本框实用技巧
1. 显示动画鼠标指针
在 Visual Basic 中,若想显示动画鼠标指针,由于 MouseIcon 属性不支持 32 位动画鼠标指针,需借助 Windows API。具体步骤如下:
1. 使用 LoadCursorFromFile Windows API 函数加载鼠标指针。
2. 使用 SetClassLong Windows API 函数更改窗口的鼠标指针。
Option Explicit
`Loads cursors and creates mouse pointer handle
Private Declare Function LoadCursorFromFile _
Lib "user32" Alias "LoadCursorFromFileA" ( _
ByVal lpFileName As String _
) As Long
`Changes class information for a window
Private Declare Function SetClassLong _
Lib "user32" Alias "SetClassLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long _
) As Long
`Index of mouse pointer in window class structure
Pr
超级会员免费看
订阅专栏 解锁全文
3210

被折叠的 条评论
为什么被折叠?



