Solved

re: animated cursors

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

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

623 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