|
-
Mar 26th, 2000, 06:39 PM
#1
Thread Starter
Frenzied Member
I want to set the cursor in my program to C:\winnt\cursors\counter.ani or C:\winnt\cursors\3dgaro.cur , but i get the error Type mismatch!
What i wrong??
-
Mar 26th, 2000, 08:30 PM
#2
Hyperactive Member
Sorry
From MSDN- MouseIcon property.
Visual Basic does not load animated cursor (.ani) files, even though 32-bit versions of Windows support these cursors.
You'll just have to stick with the standard coursors. 
But I hope that VB 7 will support animated cursors.
Onerrorgoto
Dont be to optimistic, the light at the end of the tunnel might be a train
-
Mar 26th, 2000, 09:35 PM
#3
Member
I am not sure if you are able to load an ani file or not, but here is the code to load a .cur file.
Whatever.MouseIcon = LoadPicture"C:winnt\cursors\3dgaro.cur")
My guess is you forgot the LoadPicture.
-
Jun 6th, 2000, 12:11 AM
#4
New Member
Theres an API with which you can implement animated cursors. The name of the function is LoadCursorFromFile!!!
-
Jun 6th, 2000, 12:51 AM
#5
Frenzied Member
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
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
|