Represents a window. Each Window object is a member of the Windows
collection. The Window object contains the most general methods and properties for all
window types. Window objects of specific types, such as ModelWindow,
FieldWindow, XYPlotWindow,
and TableWindow inherit from the Window object and
add some specific methods and properties.
Using the Window Object
When you create a new or open an existing Document, it
creates the Window automatically. You can refer to it as <WindowsCollection>.Item (1), where WindowsCollection is a variable or
expression of the Windows type.
To create a new window for the same document, use the NewWindow
method of the Document object.
The Close method of the Window object closes the window.
Using the Close method for the only document's window also closes the document. If this
is the case, you can provide a filename for saving the document.
Set geom = Models.Add
'Create a new empty model document
Dim winGeom as QuickField.Window
Set winGeom = geom.Windows (1)
'Get document's window
Dim winGeom2 as QuickField.Window
Set winGeom2 = geom.NewWindow
'Create another window for the same document
geom.Windows.Arrange qfTileHorisontally
'Arrange document's windows
...............
winGeom2.Close
'Close the second window
winGeom.Close
'Close the only document's window.
'The document closes automatically
A Window object has properties and methods that allows you to control the window's
visibility, size and position on the screen. You can also get and set the window caption. The GetPicture method puts the picture to the windows clipboard.
There is a Window object corresponding to the QuickField main window. You can get it
using the MainWindow property of the Application object. In the next example we make the
QuickField main window visible and then maximize it:
Dim QF As New QuickField.Application
QF.MainWindow.Visible = True
QF.MainWindow.WindowState = qfMaximized