Hey Sue and Jon,

I think there is a program in the MapInfo-L shareware archives that will
give the max/min bounding box for a window, check it out.

http://www.directionsmag.com/mapinfo-l/

Stan Johnston
Geologist
http:/home.istar.ca/~climber

Sue Port wrote:
> 
> Hi Jon,
> 
> I don't know of any MBX out there that can do what you require but if you have
> MapBasic the following code shows how to get the pixel and map coordinates for
> a mapper.
> 
> Type Rectangle
>   Left As Integer
>   Top as Integer
>   Right as Integer
>   Bottom as Integer
> End Type
> 
> Declare Function GetClientRect Lib "User32" (ByVal hwnd As Integer, Rect As
> Rectangle) As Logical
> Declare Sub Main
> 
> Sub Main
>    Dim Rect As Rectangle
>    Dim RetVal As Logical
>    Dim WinID As Integer
> 
>    WinID=FrontWindow()
>    RetVal=GetClientRect(WindowInfo(WinID,WIN_INFO_WND),Rect)
>    Run Command "Set "+MapperInfo(WinID,MAPPER_INFO_COORDSYS_CLAUSE)
>    Print "Coordinates = Pixels (Top Left is 0,0)"
>    Print "---------------------"
>    Print 
>"("+MapperInfo(WinID,MAPPER_INFO_MINX)+","+MapperInfo(WinID,MAPPER_INFO_MAXY)+")=(0,0)"
> 
>    Print 
>"("+MapperInfo(WinID,MAPPER_INFO_MAXX)+","+MapperInfo(WinID,MAPPER_INFO_MINY)+")=("+Str$(Rect.Right)+","++Str$(Rect.Bottom)+")"
> 
> End Sub
> 
> Please note I'm assuming you're using Windows and that the corners of the window
> are the minimum & maximum coordinates for the mapper - it mightn't be on some
> projections.
> 
> Let me know if you need any help with it.
> 
> Regards
> Sue.
> 
> ++++++++++++++++++++++++++++++++++++++++
>  adding   Susan Port
>   value   Technical Support Coordinator
>      to   [EMAIL PROTECTED]
>    your
> spatial   Spatial Plus
> systems   http://www.spatialplus.com
> ++++++++++++++++++++++++++++++++++++++++
> 
> >
> >Dear List,
> >
> >Is there a mbx that will allow me capture coordinate positions of  a window
> 
> >( a "save window as" window, that is).... And possibly save these values as
> 
> >ascii?
> >I need to know the bounding coordinates of the images I want to save.  Four
> 
> >x/y's  for each corner would suffice nicely, though values for each pixel
> >would be excellent!  Thanks for any help!
> >
> >Regards,
> >
> >Jon spinney
> >[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> >----------------------------------------------------------------------
> >To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> >"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to