Solved

Cursor shape change ....

Posted on 1998-03-24
1
403 Views
Last Modified: 2008-03-17
I want to get my own cursor shape.
Sure, VB supports custom type(user-made).
But it is limited by region(within only its control).
I want to use it regardless of region(on the full windows).
==
I tried somthing.
LoadCursorFromFile, SetCursor, ShowCursor..
Above APIs are able to help use my own type cursor.
BUT !!
If MouseMove Event is occurred, the shape is returned to
normal type by a certain reason(I don't know why shape changes).

Let me know how I use my own cursor for a long time.

Thank U !
0
Comment
Question by:can9999
1 Comment
 
LVL 5

Accepted Solution

by:
dirtdart earned 100 total points
ID: 1459722
To change the cursor for every window, use SetSystemCursor.

Declare Function SetSystemCursor Lib "user32" Alias "SetSystemCursor" (ByVal hcur As Long, ByVal id As Long) As Long

hcur is a handle to a cursor.  You can retrieve it with LoadCursor, but be aware that this won't work for animated cursors.  To load them, you will have to use LoadIcon.

id is the ID of the cursor that you are replacing.  For example, if you are changing from the normal cursor to your custom corsor, the id would be OCR_NORMAL.  The other cursors are listed in the Win32Api.txt under OCR_
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

809 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