Solved

re: animated cursors

Posted on 1998-07-28
4
131 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel object stays open 19 78
Updates not working for MS Windows 7 12 180
Run code from text file in vb 1 71
using web browser with BING 40 130
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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

766 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