Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

re: animated cursors

Posted on 1998-07-28
4
Medium Priority
?
137 Views
Last Modified: 2010-05-03
can you change your windows control panel settings using VB code....
if so...how does it work and where do you add the code.  I am still new to VB(i'm learning
by experimenting right now).....any info would be appreciated.
0
Comment
Question by:slow1der
  • 2
4 Comments
 

Author Comment

by:slow1der
ID: 1467020
In relation to animated cursors I want to change the pointer cursors associated with
"normal select" and "busy".....
0
 
LVL 9

Expert Comment

by:Dalin
ID: 1467021
slowlder,
Try this, let me know if you have any questions.
Regards
Dalin


'     1. API Declare

          Const OCR_NORMAL = 32512
          Const IDC_ARROW = 32512&

          Private Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
          Private Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, lpCursorName As Any) As Long ' modified
          Private Declare Function SetSystemCursor Lib "user32" (ByVal hcur As Long, ByVal id As Long) As Long

 
 ' 2. Use

          Dim hCursor As Long

          hCursor = LoadCursorFromFile( "YourFile.ani or yourFile.cur" )
          Call SetSystemCursor(hCursor, OCR_NORMAL)

'Return to the original:
       
               hCursor = LoadCursor(0&, ByVal IDC_ARROW)
               Call SetSystemCursor(hCursor, OCR_NORMAL)
0
 

Author Comment

by:slow1der
ID: 1467022
in reference to the following section of code

' 2. Use

             Dim hCursor As Long

             hCursor = LoadCursorFromFile( "YourFile.ani or yourFile.cur" )
             Call SetSystemCursor(hCursor, OCR_NORMAL)

the "yourfile.ani"  which i substituted with "ani_bbunny.ani" ( the name of the cursor i want to use)....and i get an 'invalid outside procedure' error.....will you double check the
code ....is there an option to use a line that i am not supposed to use....
0
 

Accepted Solution

by:
BRANT earned 400 total points
ID: 1467023
You will need to change Dim hCursor as long to Dim hcur as long

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question