While on the subject of the mouse cursor, what about changing mouse
functions?  When I click on the zoom tool, it would be nice if one
button would zoom in, while the other would zoom out. Similar to some
image editors. I know the scroll wheel will accomplish this to some
extent but not as predictable as the buttons.

Thanks,

Dave


-----Original Message-----
From: Jacques Paris [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, August 18, 2002 5:15 PM
To: Tobie
Cc: [EMAIL PROTECTED]
Subject: RE: MI-L Using mapbasic to customize the mouse cursor


The cursors used by MI for "general purpose" are those defined by
Windows and if you want to change them, you will have to play with
Windows API. Here is a working example implemented for MapBasic from the
Windows API Reference
(http://www.vbapi.com/)

' Display the application starting (arrow and hourglass) Windows '
cursor for three seconds.  The cursor resource is loaded from Windows.
Then ' restore the old cursor (whatever it happens to be).

Declare Function LoadCursor Lib "user32.dll" Alias "LoadCursorA" (ByVal
hInstance As Integer,
        ByVal lpCursorName As Integer) As Integer
Declare Function SetCursor Lib "user32.dll" (ByVal hCursor As Integer)
As Integer Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As
Integer)


Dim hcursor As Integer' receives handle to application starting cursor
Dim holdcursor As Integer' receives handle to previously used cursor Dim
retval As Integer' throw-away return value

hcursor = LoadCursor(0, 32650)  ' load Windows's application starting
cursor holdcursor = SetCursor(hcursor)  ' set it to the new cursor call
Sleep  (3000)  ' wait for 3 seconds retval = SetCursor(holdcursor)  '
set it to the previous cursor


I noticed there were 12 different defined icons (14 for NT) all codes in
the range 32512 - 32650

Jacques Paris
e-mail  [EMAIL PROTECTED]
MapBasic-MapInfo support  http://www.paris-pc-gis.com

Hi,

I am new to the List server.

I hope it is ok for me to contact you via email?

I need to change my cursor when drawing polylines from the small cross
to a larger crosshair type, like cursor 131 or larger and if possible
the colour as well.

I tried specifying cursor 131 in the mnu file, but it has no efect.

I hope you can help.

Thank You
Regards
Tobie




---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 2578


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 2581

Reply via email to