listwindows(
DATABASE
)

The listwindows( function builds a text array containing a list of all the open windows associated with a particular file.


Parameters

This function has one parameter:

database – is the name of the database file that you want to list the windows of. This should be the name of an open database. If the file parameter is empty ("") the listwindows( function will list all open windows, no matter what database they are in. You can also omit the parameter entirely, which will also list all open windows.


Description

This function builds a text array containing a list of all the open windows associated with a particular file.

The example below uses the listwindows( function to check to see if the Invoice:Status window is open. If not, the procedure opens the form.

if 0=arraysearch(listwindows("Invoice"),"Invoice:Status",1,cr())
    setwindowrectangle rectangle(20,5,120,255),""
    openform "Status"
endif

See listwindownumbers( to see an alternate version of this example that will work even if the window name has been changed with the windowname statement.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now allows you to completely omit the database parameter (causing all windows to be listed).