Jeff

It depends on what you want to do. If you want to just trap the clicks then
the ordinary MapBasic custom tool/tollhandler route works fine. If you want
to display the cursor coordinates as the cursor moves then you have a
problem because all MapBasic dialogs are modal ie they lock the map while
you interact with them. 

There is the new document window control in MapBasic 7 which you could use
to partly get around this but still I don't think there is an event you
could trap which would allow you to display the cursor movements in a
MapBasic text box or label. Interesting to know if you can...

You will almosty certainly need to use OLE - you could kick off a small VB,
Delphi, C++ etc app from your MApBasic script, attach it to your running
instance of MapInfo (Get Object rather than Create Object in VB) , and use
the SetStatusText method to trap MapInfos cursor motion. See the integrated
mapping stuff in the MapBasic manual - you'll need to use a callback. It
sounds a bit convoluted and probably is but its hardly any code at all - you
can use the examples that ship with MapBasic.

HTH

Paul Crisp

Syntegra
Innovation Place Delta Bank Road Newcastle NE11 9DJ
Tel 0191 461 4522 Fax 0191 460 1987


-----Original Message-----
From: Nash, Jeff [mailto:[EMAIL PROTECTED]]
Sent: 24 December 2002 02:02
To: '[EMAIL PROTECTED]'
Subject: MI-L MB: statusbar cursor location as text


Hi All,
 
I know this has been asked before, but there are conflicting answers...
 
What is the easiest way to return the cursor location to a MapBasic scripts
similar to the how the ruler tool works?
 
Is there any sample code out there that explains how this works?
 
thanks


********************************************************************

This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************

Reply via email to