This unit contains the class implementation representing a Form/Window on the screen . OS or Desktop/Window manager decides the position. Window gets placed in exact x,y coordinates set by developer. Window gets centered horizontally and vertically in the current desktop window. Following the "golden ratio 1.618" rules or ideas as to what is pleasing to the eye. The window is positioned one third from the top of the screen, using the desktop height to calculate, and centered horizontally. TfpgBaseForm is the base class from which to derive a window such as a form or dialog . Occurs when close is attempted

. Use OnCloseQuery to specify the conditions under which the form can close. An OnCloseQuery event handler returns a Boolean CanClose value that determines whether a form is allowed to close. Its default value is True.

You can use an OnCloseQuery event handler to ask users if they are sure they really want the form closed immediately. For example, you can use the handler to display a message box that prompts the user to save a file before closing the form.

OnClose
Occurs when the form closes

. Use OnClose to perform special processing when the form closes. The OnClose event specifies which event handler to call when a form is about to close. The handler specified by OnClose might, for example, test to make sure all fields in a data-entry form have valid contents before allowing the form to close.

A form is closed by the Close method or when the user chooses Close from the form's system menu.

Closing or hiding the main form terminates the application.
OnCloseQuery