标题: 当鼠标移到标签框时是手形指针是怎么实现的? [打印本页] 作者: yangzn 时间: 2003-10-18 21:44 标题: 当鼠标移到标签框时是手形指针是怎么实现的? 当鼠标移到标签框时是手形指针是怎么实现的?我反复看了它的属性没看到有什么特别的,到底是设了那个属性?作者: huanghai 时间: 2003-10-18 23:16
Private Declare Function apiLoadCursorFromFile Lib "user32" _
Alias "LoadCursorFromFileA" _
(ByVal lpFileName As String) _
As Long
Private Declare Function apiSetCursor Lib "user32" _
Alias "SetCursor" _
(ByVal hCursor As Long) _
As Long
Public Sub ChangeCursor(strCursorName As String)
Dim lngRet As Long
If Len(Dir(strCursorName)) > 0 Then
lngRet = apiLoadCursorFromFile(strCursorName)
lngRet = apiSetCursor(lngRet)
End If
End Sub