Use the optional fileName parameter to only return windows that are based on the specified file. The window could be visible, hidden, or minimized. The order of the names in the list matches the current stacking order of the windows. The visible windows are listed first, then the minimized windows, and then the hidden windows. If there are no databases or windows open, an empty string is returned.
WindowNames returns
Customers and
Invoices separated by a carriage return when those windows are currently open.
WindowNames(“contacts”) returns a list of windows that are based on the contacts database file.