Solved

Cursor shape change ....

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 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

18 Experts available now in Live!

Get 1:1 Help Now