Solved

Cursor shape change ....

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

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…

756 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