Link to home
Start Free TrialLog in
Avatar of Mark_FreeSoftware
Mark_FreeSoftwareFlag for Netherlands

asked on

Duplicate mouse pointer


what i want to do is this:

copy the current cursor to a form or picturebox, and make it look like a second cursor

i found this code on the net to copy the cursor to a form:

Private Declare Function DrawIcon Lib "user32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long
Private Declare Function GetCursor Lib "user32" () As Long
Private Sub Form_Paint()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    'Draw the current cursor on this form
    DrawIcon Me.hdc, 0, 0, GetCursor
End Sub


but then it doesn't change when the mousecursor changes
is it somehow possible to create an instance of the cursor on my form?
Avatar of g_johnson
g_johnson
Flag of United States of America image

it's not gonig to change unless you change it.  what you've done is drawn a copy of it on the form, not drawn an actual linked cursor.

does that help?
Avatar of Mark_FreeSoftware

ASKER

yes, but i want to know how one can draw an actual linked cursor ;)
Avatar of Mike Tomlinson
To what end?  Can you give us a bigger picture of what you want your application to do?

basically i want four mouse pointers on my screen,

1 as a normal pointer, the other 3 a bit grayed out so it is clear what is the active one

(don't ask, it was a customer who came with the idea of 4 pointers)
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial