Solved

Cursor shape change ....

Posted on 1998-03-24
1
402 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…

932 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

13 Experts available now in Live!

Get 1:1 Help Now