Dawn,

you need to get a mapbasic programmer to compile &test the following little
routine using the Winfocuschangedhandler and a setmap statement.

( Sorry i am away from my mapbasic machine at the mo so i am not entirely
sure the code will be 100% fully functioning...but it should work....to make
it better.. a toggled switch under the 'window' menuo ption would be
best..the app could also then be set to autoload for all users so they would
never know it was running..

if you need a compiled version email me later..

code snippet follows>>>>>>>>>>>>>>

Include "mapbasic.def" 

Include "menu.def"

Declare Sub Main

Declare sub WinFocusChangedHandler 

Sub Main

Note "Metric Map units will run for this MapInfo session"

' U really need to set a menu and toggle here'

End Sub

Sub WinFocusChangedHandler 

Dim i_win_type As SmallInt 

i_win_type=WindowInfo(CommandInfo(CMD_INFO_WIN),WIN_INFO_TYPE)

If i_win_type = WIN_MAPPER Then 

set Map window CommandInfo(CMD_INFO_WIN)

Distance Units "m" 

'Job done! could also set other stuff like whether Mi uses
spherical/cartesian , or shows coords  on statusbar etc

Else

' not a mapper so no need to worry...'layouts etc will use whatever they
have already got set

End If 

End Sub 

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<end of code

regards

r

Russell Lawley 
Geoscientist 
British Geological Survey 
www.bgs.ac.uk 

 


*********************************************************************
This e-mail message, and any files transmitted with it, are 
confidential and intended solely for the use of the addressee.
If this message was not addressed to you, you have received
it in error and any copying, distribution or other use of any
part of it is strictly prohibited. Any views or opinions presented
are solely those of the sender and do not necessarily represent
those of the British Geological Survey. The security of e-mail
communication cannot be guaranteed and the BGS accepts
no liability for claims arising as a result of the use of this medium
to transmit from or to the BGS. The BGS cannot accept any
responsibility for viruses, so please scan all attachments.
http://www.bgs.ac.uk
*********************************************************************

Reply via email to