Solved

re: animated cursors

Posted on 1998-07-28
4
128 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 100 total points
ID: 1467023
You will need to change Dim hCursor as long to Dim hcur as long

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now