Cristophe wrote: "But this method is not very nice, because the user MUST first click on the ToolButton, each time before clicking on the map."
with a simple trick you need to only push once the button (not all/each the time) then as far as you want when you click on the map you can get the coordinates. I have "derived" a simple DEMO for you in VB6 (mostly based on MapBasic help/demo) You can download the source of my "DEMO" (78 kB) from here: (of course everyone else who are interesting also can do) http://web.axelero.hu/rugo100/xydemo.zip Note: DEMO uses "HUNGARY.TAB/DAT/MAP/ID" You should put these files into your C:\ or change the source to be able find them. (also-and of course- demo will work on a machine where MapInfo is installed and working. regards George ('rugo') VideoLogger+VisualTracker http://web.axelero.hu/rugo100/vlt.htm ----- Original Message ----- From: "Christophe Brabant" <[EMAIL PROTECTED]> To: "MapInfo Help" <[EMAIL PROTECTED]> Sent: Wednesday, November 17, 2004 5:06 PM Subject: MI-L RE : MI-L Follow Mouse Coordinates with Mapbasic The exact thin I want to do is retrieve the moose coordinates when I click on a map. The way I use actually is : Create a ToolButton, calling 'mycallback' then Sub mycallback Dim x,y As Float x = CommandInfo(CMD_INFO_X) y = CommandInfo(CMD_INFO_Y) nb_found = SearchPoint(-,-,x,y) s_table = SearchInfo(----) .... Then enumerate the results..... End Sub But this method is not very nice, because the user MUST first click on the ToolButton, each time before clicking on the map. Christophe -----Message d'origine----- De : rugo100 [mailto:[EMAIL PROTECTED] Envoy� : mardi 16 novembre 2004 19:50 � : Christophe Brabant; MapInfo Help Objet : Re: MI-L Follow Mouse Coordinates with Mapbasic Hi Christophe, short and direct example not possible I think, but should know if you want use this feature in your own application you should use "callback". you can find detailed information in MapBasic's help - Integrated Mapping section. Note: to get continuously the mouse coordinates and to get coordinate of clicked point is two different things. In an integrated application MapInfo able to communicate to your application through callback. E.g. MI continously able to send status text to your application, from it you will able to pick-up actual coordinate and display it on your form's statusbar for example.(As you move the cursor on map coordinates will display in your form's statusbar) On the same way when you click on a map MI send info (throught callback) to your application which will/can include x,y clicked then you can pick them up and display. Hope this helps a bit regards George ('rugo') VideoLogger+VisualTracker http://web.axelero.hu/rugo100/vlt.htm ----- Original Message ----- From: "Christophe Brabant" <[EMAIL PROTECTED]> To: "MapInfo Help" <[EMAIL PROTECTED]> Sent: Tuesday, November 16, 2004 5:03 PM Subject: MI-L Follow Mouse Coordinates with Mapbasic Hi I would like to display continuously the mouse coordinates, to know exactly the cursor position when I click on a map. At 06/21/2004, B. Thoen talked about XMouse tool, written by Robert Edwards few years ago. He specified too a list of Windows API used to do that, like ClientToScreen, GetClientRect, GetCursorPos.... Does someone know more about that ? Thank you - Chris --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14075 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14096 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14100
