UnderwareDesign
May 23, 2013, 02:01:20 PM *
News: Creeping Angels Work In Progress by bmorris (14th,Dec,2012)
   Home    
Pages: [1]
 
Author Topic: Hand pointer  (Read 1109 times)
Member


« on: October 20, 2008, 08:44:44 AM »


Hi,

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

Thanks,
Logged


Ádáz

Hungary
Member


« Reply #1 on: October 20, 2008, 08:51:30 AM »

PlayBASIC Code:
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


Logged


Ádáz

Hungary
Member


WWW
« Reply #2 on: October 20, 2008, 10:57:39 AM »

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

Pages: [1]
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2009, Simple Machines LLC | Privacy Policy Valid XHTML 1.0! Valid CSS!