Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to use an animated cursor?

Status
Not open for further replies.

MDA

Technical User
Jan 16, 2001
243
US
Hi all,

I was wondering if it is possible/how to use an animated cursor in VB6?

my code is:

-----
Me.MouseIcon = LoadPicture(App.Path & "\cursor.ani")
Me.MousePointer = 99
-----
But VB does not like this type of file? Instead of using a progress bar or something similar, I just want to have some animated cursor that shows a process is taking place.

Any ideas?

Regards,

MDA
 
Yes, its possible to use an animated cursor, but you cannot do it directly from VB. You must use a couple of API call.


Private Declare Function SetClassWord Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal wNewWord As Long) As Long

Private Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long

'=======================================================


Private Sub Set_Cursor

Dim SysCursHandle As Long,
Dim Curs1Handle As Long


Curs1Handle = LoadCursorFromFile("c:\windows\Cursors\globe.ani")
SysCursHandle = SetClassWord(Me.hwnd, -12, Curs1Handle)


End Sub
Good Luck
------------
Select * from Users where Clue > 0
0 rows returned
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top