try this code
Code:Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Private Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long Private Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) SetCursor MyCursor End Sub Private Sub Form_Load() MyCursor = LoadCursorFromFile("C:\winnt\cursors\counter.ani ") End Sub Private Sub Form_Unload(Cancel As Integer) CloseHandle MyCursor End Sub




Reply With Quote