|
-
September 17th, 2001, 09:30 AM
#1
Using animated cursors
Hi can anybody help me on using animated cursors in my program??
-
September 17th, 2001, 09:52 AM
#2
Re: Using animated cursors
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 hCurOld as Long
private Sub Form_Load()
Dim hCur as Long
hCur = LoadCursorFromFile("c:\winnt\cursors\metronom.ani")
hCurOld = SetClassLong(Form1.hwnd, GCL_HCURSOR, hCur)
End Sub
private Sub Form_Unload(Cancel as Integer)
Dim hCur as Long
hCur = SetCursor(hCurOld)
End Sub
Iouri Boutchkine
[email protected]
-
September 17th, 2001, 10:00 AM
#3
Re: Using animated cursors
Thank u verry much for this reply, but i need this in a label_mousemove event. Can you help me with this??
-
September 17th, 2001, 10:17 AM
#4
Re: Using animated cursors
'then add this code in general section:
dim blnload as boolean
'and use Iouri code in different events:
private Sub label1_mousemove()
Dim hCur as Long
if blnload= false then
hCur = LoadCursorFromFile("c:\winnt\cursors\metronom.ani")
hCurOld = SetClassLong(Form1.hwnd, GCL_HCURSOR, hCur)
blnload = true
end if
End Sub
private Sub Form_mousemove
Dim hCur as Long
if blnload = true then
hCur = SetCursor(hCurOld)
blnload = false
end if
End Sub
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|