Change mouse cursor.BlitzPlus Forums/BlitzPlus Programming/Change mouse cursor.
| Hi, I've been looking for a way of changing the mouse cursor (in Windows mode not full screen) to one of the different shapes but can't see what command I use.|
Can anyone help me? Thank you.
(I want to change the mouse cursor to an up down arrow shape when it's at a certain point on the screen that coincides with with a dragable canvas anchor point.
| You probably only have to work with HidePointer, ShowPointer, and DrawImage. Just draw your image at MouseX and MouseY, and use hidpointer to hide the normal pointer.|
Global w=640,h=480 ;Define Variables (I always make them global no matter what) Global image=LoadImage("image.bmp") ;This would be your image Graphics w,h,16,2 ;Start GFX Mode HidePointer ;HidePointer hides the normal cursor Repeat ;Make a loop Cls ;Clear Screen Rect MouseX(),MouseY(),5,5 ;Normally you would draw your image here, but for now I am drawing a Rectangle. Flip ;Flip onto Frontbuffer Until KeyHit(1) ;Check If user has hit escape
Hope it helps!
[EDIT]: Sorry about my unorganized code. I'm still getting used to posting code.
| Cheers Rich05|
That should work fine for me.
And thanks for taking the trouble to write that code :-)
| also see: http://www.blitzbasic.com/codearcs/codearcs.php?code=588|
this code shows how to use userlibs to change the pointer to any of windows standard ones.
| Oh yes, I missed that. |
One day I'm going to have to learn how to use userlibs.