Table of Contents

TTMSFNCCustomAppFormPersist Class

Base class that automatically persists the size, position, and maximized state of its owner form between application runs.

API unit family: TMSFNCAppFormPersist Inherits from: TTMSFNCCustomComponent

Syntax

TTMSFNCCustomAppFormPersist = class(TTMSFNCCustomComponent)

Remarks

Drop the component on a form to have its window bounds saved when the form closes and restored when the form is shown again. The settings are stored in an INI file identified by FileName, under a key built from SaveFileKey and, optionally, the current user and machine names. Restored bounds are clamped to the visible desktop so the form never reopens off-screen.

Methods

Name Description
LoadFormSettings Loads and applies the saved size and position to the owner form immediately.
SaveFormSettings Saves the current size and position of the owner form to the settings file immediately.