Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

re: animated cursors

Posted on 1998-07-28
4
Medium Priority
?
136 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

688 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