Arranges iconized MDI Child windows (minimized Child windows) within a given window in rows.
ArrangeIcons wh%
wh%:integer expression
When a (Child-) window is iconized by clicking on the minimize box, the window icon frequently does not appear at the desired spot. Such icons can be moved by using the mouse. A convenient arrangement of icons consists of ordering them next to each other along the full window width.
When the window edge is reached the remaining icons are placed on the second, third, etc... row. The GFA-BASIC command ArrangeIcons performs such a placement and the only parameter it requires (wh%) is the number of the parent window.
ParentW 1
ChildW 2, 1
ChildW 3, 1
Do
Sleep //move the iconized window
Until MouseK = 2
ShowW 2, SW_MINIMIZE
ShowW 3, SW_MINIMIZE
ArrangeIcons 1
Do : Sleep : Until Me Is Nothing
CloseW 1 : CloseW 2 : CloseW 3
Opens a parent window (1) and sets two child windows (2 and 3) within it. The child windows are minimized (iconized). The program then waits for a right mouse button click. Please move an icon in the parent window. Following the mouse click the command ArrangeIcons "rearranges" the icons.
Instead of using this old command, you could use the Form method Win_1.MdiArrangeIcons. Other MDI Form methods are MdiCascade and MdiTile.
ArrangeIcons corresponds to the Windows function ArrangeIconicWindows().
{Created by Sjouke Hamstra; Last updated: 23/09/2014 by James Gaite}