|
Получение анимированного курсора |
|
|
Private Declare Function LoadCursorFromFile Lib "user32" Alias
"LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Private Declare Function SetClassLong Lib "user32" Alias
"SetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As
Long) As Long
Const GCL_HCURSOR = (-12)
Dim sCursorFile As String
Dim hCursor As Long
Dim hOldCursor As Long
Dim lReturn As Long
Private Sub Command1_Click()
hCursor = LoadCursorFromFile(sCursorFile)
hOldCursor = SetClassLong(Form1.hwnd, GCL_HCURSOR, hCursor)
End Sub
Private Sub Command2_Click()
lReturn = SetClassLong(Form1.hwnd, GCL_HCURSOR, hOldCursor)
End Sub
Private Sub Form_Load()
'не забудьте указать свой путь к анимированному
курсору
sCursorFile = "C:\WIN\CURSORS\GLOBE.ANI"
End Sub
|
|
|
|
|
|
|