- Home
·
- Miscellaneous
·
- How to set system cursor from selected cursor file or animation cursor file
How to set system cursor from selected cursor file or animation cursor file
How to set system cursor from selected cursor file or animation cursor file
API Declarations
Private Const OCR_NORMAL = 32512
Private Declare Function SetSystemCursor Lib "user32" (ByVal hcur As Long, ByVal id As Long) As Long
Private Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Private Declare Function GetCursor Lib "user32" () As Long
Dim CurCursor As Long
Dim modCurName As String
Dim modCur As Long
Rate How to set system cursor from selected cursor file or animation cursor file
(1(1 Vote))
SetSystemCursor CurCursor, OCR_NORMAL 'Restore Default Cursor
End Sub
Private Sub Command2_Click()
modCurName = "c:\test.cur" 'Or c:\test.ani
modCur = LoadCursorFromFile(modCurName)
SetSystemCursor modCur, OCR_NORMAL
End Sub
Private Sub Form_Load()
CurCursor = GetCursor() 'Store Default Cursor
End Sub
How to set system cursor from selected cursor file or animation cursor file Comments
No comments yet — be the first to post one!
Post a Comment