Hello Scott,

If i right understand you - all what you need - read the MapBasic
Manual's Chapter - "WinChangedHandler procedure"
------------------------------------------------------------------
Purpose

A reserved procedure, called automatically when a Map window is panned or zoomed, or 
whenever a map layer is added or removed. 

Syntax

Declare Sub WinChangedHandler 
Sub WinChangedHandler 
         statement_list   
End Sub 
statement_list  is a list of statements to execute when the map is panned or zoomed 

Description

WinChangedHandler is a special-purpose MapBasic procedure name. If the user runs an 
application containing a procedure named WinChangedHandler, the application "goes to 
sleep" when the Main procedure runs out of statements to execute. As long as the 
sleeping application remains in memory, MapBasic calls WinChangedHandler whenever a 
Map window's extents are modified (e.g. the Map is scrolled, zoomed or re-sized). 
Within the WinChangedHandler procedure, call CommandInfo(�) to determine the Integer 
window ID of the affected window. 
Multiple MapBasic applications can be "sleeping" at the same time. When a Map window 
changes, MapBasic automatically calls all sleeping WinChangedHandler procedures, one 
after another. 
Under some circumstances, MapBasic may call a WinChangedHandler procedure as a result 
of an event which did not affect the map extents. For example, drawing a new object 
may trigger the WinChangedHandler procedure. 
To halt a sleeping application and remove it from memory, use End Program. 

Auto-scrolling Map Windows

MapInfo 4.0 automatically scrolls the Map window if the user clicks with the mouse and 
then drags to the edge of the window. If the user auto-scrolls a Map window, MapInfo 
calls WinChangedHandler after the tool action is completed or canceled. 
For example, if you use MapInfo's Ruler tool and you autoscroll the window during each 
segment, MapInfo calls WinChangedHandler once, after you double-click to complete the 
measurement (or after you press Esc to cancel the Ruler tool). If the user 
auto-scrolls while using a custom MapBasic tool, MapInfo calls the tool's handler 
procedure, and then calls WinChangedHandler. 
MapInfo will not call WinChangedHandler if the user auto-scrolls but then returns to 
the original location before completing the operation or pressing Esc. 
To disable the autoscroll feature, use the Set Window statement.

Example

For an example of using a WinChangedHandler procedure, see the OverView sample program.

See Also 

System event handlers  
------------------------------------------------------------------
-- 
Best regards,
Vladimir Lashin
MBBuilder COD mailto:[EMAIL PROTECTED]
microOLAP Technologies LLC
http://www.microolap.com/gis/  - GIS related products



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

Reply via email to