Main Menu

Hand pointer

Started by Adaz, October 20, 2008, 08:44:44 AM

Previous topic - Next topic

Adaz

Hi,

How can I change the mouse pointer to "hand" icon? Do I have to call a dll?

Thanks,

Ádáz

Hungary

Adaz

#1
PlayBASIC Code: [Select]
Constant IDC_HAND = 32649
constant IDC_ARROW = 32512

LinkDll "user32.dll"
LoadCursor (hInstance, lpCursorName) alias "LoadCursorA" As integer
SetCursorA (hCursor) alias "SetCursor" As integer
EndLinkDll


do
cls 0
if leftmousebutton()
SetCursorA (LoadCursor(0,IDC_HAND))
else
SetCursorA (LoadCursor(0,IDC_ARROW))
endif
sync
loop



Ádáz

Hungary

thaaks

You could of course also switch off the mouse pointer using
Mouse off
and draw any sprite at the cursor position...