# 如何改变滑鼠的游标显示

Posted by Tony on January 15, 1999 at 17:46:33:

我使用CWW的VB心得笔记中的程式"如何将滑鼠的游标显示成动画游标"，
虽然我制作的不是动态，但仍可改变，却无法复原，

原始码
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, ByVal lpCursorName As String) As Long
Private Declare Function SetSystemCursor Lib "user32" (ByVal hcur As Long, ByVal id As Long) As Long
Const OCR_NORMAL = 32512
Const IDC_ARROW = 32512&
Const OCR_NO = 32648

Dim hCursor As Long

Private Sub Com_Click()
hCursor = LoadCursor(0&, ByVal IDC_ARROW)
Call SetSystemCursor(hCursor, OCR_NORMAL)
End

End Sub

Private Sub Form_Load()
hCursor = LoadCursorFromFile(App.Path & "\heart.cur")
Call SetSystemCursor(hCursor, OCR_NORMAL)

End Sub

不知问题何在，烦请各位高手指正．

Follow Ups:

- Re: 如何改变滑鼠的游标显示 尧仔 08:04:19 1/17/99 (0)