Controlling Window Size and Location

GISDK provides full control over the size and location of windows. Window sizes and positions are expressed in numbers ranging from 0 to 100, where the number represents a percentage of the size of the frame. The functions shown in the following table are used for this purpose:

Function What it does
ArrangeIcons() Arranges all minimized windows
CascadeWindows() Cascades open windows
GetAbsoluteWindowSize() Determines the absolute size of a window
GetWindowPosition() Gets the position of a window
GetWindowSize() Determines the size of a window
MaximizeWindow() Maximizes a window so that it fills the Maptitude client area
MinimizeWindow() Minimizes (iconizes) the specified window
RestoreWindow() Restores a window to its original size
SetWindowPosition() Sets the position of a window
SetWindowSize() Sets the size of the specified or currently active window
SetWindowSizePixels() Sets the size of the specified or currently active window
TileWindows() Tiles all open windows

Here is a short example:

// Set the frame (the program window) to fill the entire screen
SetWindowPosition("Frame|", 0, 0)
SetWindowSize("Frame|", 100, 100)
// Now, get the names of all the windows
win_info = GetWindows()
win_names = win_info[1]
win_types = win_info[2]
//Loop over windows, minimizing all editors and layouts
for i = 1 to win_types.length
if win_types[i] <> "Map" then MinimizeWindow(win_names[i])
end
// Finally, tile all the maps on the screen
TileWindows()