NumWindows() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns the number of open document windows (Map, Browse, Graph, Layout windows). You can call this function from the MapBasic window in MapInfo Pro.

Syntax

NumWindows() 

Return Value

SmallInt

Description

The NumWindows() function returns the number of Map, Browse, Graph, Layout windows that are currently open. The result is independent of whether windows are minimized or not.

To determine the total number of windows opened by MapInfo Pro (including ButtonPads and special windows such as the Info window), call NumAllWindows().

Example

Dim num_open_wins As SmallInt
num_open_wins = NumWindows()

See Also:

NumAllWindows() function, WindowID() function