On Wed, Sep 20, 2006 at 03:52:38PM +1000, [EMAIL PROTECTED] wrote:
> 
> I have a map window that I know the name of "property_enquiries".
> 
> How can I convert this name into a map window id? The kind that will be
> accepted by a command such as;
> 
> Set Map Window window_id Layer 1 Display Off

You'll have to loop through all open windows, testing thie name and whne
you find the one named 'property_enquiries' us WindowID() to translate the
short id to the long Windows one.

Dim i As SmallInt
Dim nWinId as Integer

For i = 1 to NumWindows()
  If WindowInfo (i, WIN_INFO_NAME) = "property_enquiries" Then
    nWinId = WindowId(i)
    Exit for
  End If
Next
If nWinId = 0 Then
  Note "Window not found."
Else
  Set Map Window nWinId Layer 1 Display Off
End If

_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to