6.13.2 Minimizing, Maximizing and Restoring the Form
You can minimize, maximize and restore the form programmatically using the MinimizeForm, MaximizeForm and RestoreForm methods.
This command restores the form to the size it was before it was maximized:
invoke #formc.restoreform
To find out whether the form has been minimized, maximized or not, use the WindowState property of the form. The WindowState can be minimized, maximized or normal. This code shows the form's window state in a message box when the form is closed:
EVTROUTINE HANDLING(#COM_OWNER.Closing)
USE BUILTIN(OV_MESSAGE_BOX) WITH_ARGS(#FORMC.WINDOWSTATE)
ENDROUTINE