Implements Forms, which are the basis for the Lazarus Graphical User Interface.

forms.pp contains classes, types, and routines used to implement forms, which are used as the basis a graphical user interface in the Lazarus Component Library (LCL).

The following components are added to the Lazarus IDE component palette:

Standard Tab

- TFrame

Additional Tab

- TScrollBox
- TApplicationProperties

The unit also includes the TApplication and TScreen classes used in the Application and Screen singletons.

Type used for a procedure that takes no arguments.

Used to define members in control classes.

Type used for an object procedure that takes no arguments.

Used to define members in control classes.

Represents the Position and Size of a Form on Screen.

TPosition is an enumerated type with values that describe the policy used to position and size a form instance in an application. TPosition is the type used to implement the Position property in TCustomForm. TPosition is used in the implementation of the MoveToDefaultPosition method in TCustomForm.

The Form appears exactly as it is positioned and sized in the Form Designer.
The window manager decides how the form is to appear, in a default position and size.
Keeps the designed form size, but position determined by window manager.
Keeps the designed form position, but size determined by window manager.
Centers the form on screen.
Centers the form on the desktop (not recommended, use poScreenCenter).
Centers the form on the Main Form.
Centers the form on its Owner form.
Represents the actual State of the window on the screen.

The actual meaning of each value depends on the platform:

Windows and Mac OS X
  These operating systems support all values.
X11
  The window state is a hint sent to the Window Manager, so more primitive Window Managers might ignore these hints.
Windows CE
  In Windows CE platforms where Application.ApplicationType = atKeyPadDevice or atPDA (like in Windows Phone, PocketPC and Windows Mobile), wsMinimized and wsNormal are understood as wsMaximized, which is the normal state for windows in this platform. An exception are windows with BorderStyle=bsDialog or bsNone, which are allowed to have a custom position and size. For more information please read the Lazarus Wiki article.
Android
  In this platform windows are always fullscreen.

Neither maximized nor minimized.
The window is minimized and is not shown in the screen, but only in the taskbar.
The window appears maximized. The exact behavior is up to the window manager, but usually the window appear occupying all of the work area of a monitor.
The window appears in full screen mode, when allowed by the platform. It will, for example, attempt to appear on the top of taskbars and other static platform user interface elements.
What should happen when a form is closed.
TCustomForm.OnClose
Do nothing.
The form is hidden.
The form is destroyed.
The form is minimized.
Represents a standard action used to get a Hint value.

TCustomHintAction is a TCustomAction descendant. TCustomHintAction publishes the Hint property available in the ancestor. TCustomHintAction is the base class for THintAction defined in the StdActns unit.

TCustomHintAction is used in TApplication when setting the value for its Hint property and its OnHint event handler has not been assigned. TCustomHintAction is also used in the ExecuteAction method in TStatusBar when its AutoHint property is enabled.

TStatusBar.ExecuteAction THintAction
The text used for the Hint.
The orientation of a scroll bar.
Horizontal scroll bar.
Vertical scroll bar.
The range for scroll bar increments.
Scroll bar style flags.
Default style; not used in the current LCL version.
Scroll bar appears flat; Not used in the current LCL version.
Scroll bar sends HotTrack messages; Not used in the current LCL version.
Exception class raised in .
Scroll bar type used in TScrollingWinControl.

Scrollable controls supply their own integrated scroll bars, one for horizontal and one for vertical scrolling. This class allows access to (one of) these integrated scroll bars.

A scrollable control has both a physical (visible) client size, and a logical (virtual) client size.

The Range property reflects the total virtual client size, in pixels.

The Page property corresponds to physical (visible) client size, in pixels, excluding the scroll bars. It also determines the size of the slider, relative to the total Range.

The Position property reflects the virtual origin of the visible client area, equivalent to the top coordinate of the slider. The Position can be changed by the user or by code.

Scroll bars usually appear only when Range is higher than Page, i.e. when the entire content cannot be shown at the same time. See the scroll bar properties in TScrollingWinControl for more details.

The virtual scroll range (Range - ClientSize), at least zero and never negative.
The associated TScrollingWinControl instance.
Gets the Handle for the associated TScrollingWinControl instance.

Provides the handle passed as an argument to routines in the LCL interface, including:

- GetScrollInfo
- SetScrollInfo
- GetScrollbarSize
- GetScrollbarVisible

GetScrollInfo SetScrollInfo GetScrollbarSize GetScrollbarVisible
The handle for the associated control.
The AutoScroll state for the associated TScrollingWinControl control.
GetAutoScroll
is not used as the read access specifier for the AutoScroll property. It is used in methods to ensure that the class reflects the current state for its associated control.
True when the Control for the class instance has set its AutoScroll property.
Gets the value for the Increment property.
Value for the property.
Gets the value for the Page property.
Value for the property.
Gets the value for the Position property.
Value for the property.
Gets the value for the Range property.
Value for the property.
Gets the value for the Size property.
Value for the property.
Gets the value for the Smooth property.
Value for the property.
True when the associated TScrollingWinControl and its handle are valid.

Used in methods which call LCL interface routines to avoid exceptions resulting from an unassigned control or an invalid handle value.

True when the associated TScrollingWinControl and its handle are valid.
Implements the storage specifier for the Range property.
True when AutoScroll is enabled for the scroll bar.
Forces the associated control to update its scroll bars.

Calls the UpdateScrollBars method in the associated TScrollingWinControl instance when its handle has been allocated. No actions are performed in the method during LCL component streaming and when the component is freed.

Validates and applies the specified Range and updates the scroll bars.

Ensures that AValue is not less than zero (0). Applies the range limited value to the member for the Range property, and calls ControlUpdateScrollBars to refresh the scroll bars for the associated TScrollingWinControl instance.

InternalSetRange is called when the SetRange method updates the value for the Range property.

Value checked and applied to the Range property.
Handler for scroll bar movement messages.

ScrollHandler is a method used to ensure that the control message in Message is applied to the Position property for the scroll bar. ScrollHandler uses the ScrollCode member from the TLMScroll instance to determine the actions needed in the method. It handles the following ScrollCode values:

SB_LINEUP
  Decreases Position by the value in Increment.
SB_LINEDOWN
  Increases Position by the value in Increment.
SB_PAGEUP
  Decreases Position by the value in Page.
SB_PAGEDOWN
  Increases Position by the value in Page.
SB_THUMBPOSITION
  Sets Position to the value in the Pos member in Message.
SB_THUMBTRACK
  Sets Position to the value in the Pos member in Message when Tracking is enabled. No actions are performed when Tracking is set to False.
SB_TOP
  Sets Position to 0 (zero).
SB_BOTTOM
  Sets Position to the value in the Range property.

No actions are performed in the method if Message has any other value in its ScrollCode member. No actions are performed in the method at design-time.

ScrollHandler ensures the the new value for the Position property is in the range 0..Range. Calls InvalidateScrollInfo to force scroll bar information to be re-initialized. Calls SetPosition to apply the new value for the Position property and scrolls the associated TScrollingWinControl accordingly. Sets the Result member in Message to 1 to indicate the control message was handled in the method.

ScrollHandler is called when the WMHScroll or WMVScroll methods in the associated TScrollingWinControl instance are used to handle scroll messages.

Control message examined in the method.
New value for the property.
New value for the property.
New value for the property.
New value for the property.
New value for the property.
New value for the property.
New value for the property.
New value for the property.
Updates the state and position for the scroll bar in the associated Control.

UpdateScrollBar is a procedure used to update the state and position for the scroll bar in the associated Control.

When Control is a TScrollingWinControl instance, TScrollInfo is captured using the Range, Position, and Page properties. The scroll bar information is applied to the associated control by calling SetScrollInfo.

TScrollInfo
values are not applied when a handle has not been allocated for the control, or when Control is not a TScrollingWinControl class instance.

UpdateScrollBar calls SetPosition to apply the current value in Position to a visible scroll bar in the class instance. When Control is a TScrollingWinControl instance, the Smooth property is used to determine if Increment needs to be adjusted to a value that is 10% of the Page size for the control.

UpdateScrollBar is used in the implementation of the ControlUpdateScrollBars method.

Renders scroll information invalid for the control.

InvalidateScrollInfo is used to mark the current TScrollInfo in the control as invalid. This occurs when a new value is assigned to the Position property, and when ScrollHandler applies position information found in TLMScroll messages. Calling InvalidateScrollInfo results in TScrollInfo being updated and applied for scrolling window controls in the UpdateScrollBar method.

TLMScroll
Gets the horizontal scroll bar for the control.
TControlScrollBar instance representing the scroll bar.
Get the vertical scroll bar for the control.
Scroll bar for the control, or Nil when not a TScrollingWinControl descendant.
Determines whether a scroll bar is required.
True when Visible, and Range is larger than the Page size.
Constructor for the class instance.

Create is the constructor for the class instance, and calls the inherited constructor on entry.

Create sets the assocaited control for the class instance and the Kind property to the values specified in the AControl and AKind arguments. Create sets the default values for properties, including:

Page
  Set to 80.
Increment
  Set to 8.
Position and Range
  Set to 0 (zero).
Smooth and Tracking
  Set to False.
Visible
  Set to True.

TObject.Create
The windowed control in which the scroll bar is found.
The scroll bar orientation.
If Source is a TControlScrollBar, copies properties to itself, else performs inherited Assign.

Assigns the contents of the source object to the current object; in particular finds the Increment, Position, Range and whether smooth scrolling is to be feature and whether the scroll bar is visible.

TPersistent.Assign
TControlScrollBar instance with the values copied in the method.
Determines if the scroll bar is visible using the state from the widgetset class.

IsScrollBarVisible is a Boolean function used to determine if the scroll bar for the associatied control is visible. The return value defaults to the value in the Visible property. If the handle has been allocated for the control, the GetScrollbarVisible routine from the LCL interface is used to get the visiblity for the scroll bar Kind.

IsScrollBarVisible is used in the implementation of the ClientSizeWithBar and ClientSizeWithoutBar methods.

True if the scroll bar is visible.
The Position for the scroll bar, or zero if not Visible.
The scroll bar Position, or zero if not Visible.
Gets the scroll bar with the opposite orientation (horz/vert) of the current instance.
TControlScrollBar instance for the opposite orientation.
The adjustable size of the scroll bar.

The length of the bar is the Width (or Height) of the Parent Control, the Size is the other (free) coordinate.

Returns the size for the associated control.

ControlSize is an Integer function used to get the size for the associated control in the class instance. Uses the value in Kind to determine the control property used as the return value. When Kind is sbVertical, the Width for the associated Control is used. When Kind is sbHorizontal, the Height for the associated Control is used.

Size for the associated control.
Gets the size for the scroll bar based on the client area in the associated control.

ClientSize is an Integer function used to get the size from the client area in the associated control. ClientSize uses the value in Kind to determine whether the height or width for the associated control is used as the return value. For example:

sbVertical
  Returns the client width from the associated control.
sbHorizontal
  Returns the client height from the associated control.

ClientSize is used in methods like ClientSizeWithBar and ClientSizeWithoutBar to get the size for the scroll bar adjusted for scroll bar spacing returned from GetSystemMetrics.

Size from the client area in the associated control.
Calculates the size of the associated control when the scroll bar is Visible.

ClientSizeWithBar is an Integer function used to calculate the client area for the associated control when the scroll bar is Visible. The return value contains the calculated value from ClientSize. If the scroll bar is not Visible, additional spacing (for the SM_SWSCROLLBARSPACING system metric) between the scroll bar and its associated control is removed from the return value.

ClientSizeWithBar is used in the implementation of the ComputeScrollbars method in TScrollingWinControl when the Range for the scroll bar would exceed the space available on the control, and in the GetPreferredSizeClientFrame method.

Size for the client area after adjusting for a visible scroll bar.
Calculates the size of the associated control when the scroll bar is not Visible.

ClientSizeWithoutBar is an Integer function used to calculate the client area for the associated control when the scroll bar is Visible. The return value contains the calculated value from ClientSize. If the scroll bar is Visible, additional spacing (for the SM_SWSCROLLBARSPACING system metric) between the scroll bar and its associated control is added to the return value.

ClientSizeWithoutBar is used in the implementation of the ComputeScrollbars and GetPreferredSizeClientFrame methods in TScrollingWinControl.

Size for the client area when the scroll bar is hidden.
The small Position increment, applicable to the scroll bar arrows.

Increment is a TScrollBarInc property which indicates the amount the client area in the associated control is scrolled when the Up or Down navigation arrows on the scroll bar are clicked. The default value is 8.

The value in Increment may be automatically recalculated in the UpdateScrollBar method when the Smooth property is enabled and the associated control is a TScrollingWinControl descendant. This is done to ensure that Increment contains 10% of the value for the Page property.

Increment is used in the ScrollHandler method when updating the Position property for scroll bar messages received in the control.

The orientation for the scroll bar: horizontal or vertical.

Kind is a read-only TScrollBarKind property which indicates the orientation for the scroll bar. The value for Kind is passed as an argument to the Create constructor, and stored in the property. The value in Kind is used in methods which update properties or state for the control, such as:

- Position
- Range
- Page
- Tracking
- Size
- ClientSize
- ControlSize
- IsScrollBarVisible
- GetOtherScrollBar
- UpdateScrollBar

The slider size, position increment applicable to the scroll bar area beneath the slider.

The amount by which the scroll indicator moves if the cursor selects the scroll bar above, below or on either side of the scroll indicator. The default value is 80.

Enables smooth scrolling, with automatic adjustment of Increment and Page.

Smooth is a Boolean property that indicates if the associated control is scrolled using an Increment value computed to be 10% of the Page size for the scroll bar. Set Smooth to True when the scroll bar should use a scrolling increment based on the size of the client area in the associated control. When Smooth is set to False, the Increment property determines the size for the scroll operation when the Up or Down arrows are clicked.

Smooth is used in the UpdateScrollBar method, and when set to True causes the value in Increment to be recalculated using the proportional size value. Smooth is relevant when the associated control is descended from TScrollingWinControl.

The default value for the property is False.

Position of the slider, 0..Range-Page.

The Position reflects the top coordinate of the slider, which is Range-Page when the slider is at the bottom of the bar.

The virtual size of the Parent Control.
Gives feedback while the slider is dragged.

When it takes a significant amount of time to repaint the parent control at a new position, Tracking should be False to prevent flicker. This causes the control to be updated only when the slider is released.

Hides the scroll bar when False (default True).

The scroll bar widget is visible only if (Visible=True) and (Range>Page).

Set Visible to False to disallow the user to scroll the content, while the content still can be scrolled by code.

Use IsScrollBarVisible to get the current visible state of the widget.

Class of a windowed control with incorporated scroll bars.

This class introduces a logical (virtual) client area, part of which is visible in the physical (visible) client area. ScrollBars allow the user to scroll through the logical client area.

TScrollingWinControl is the ancestor for components like TScrollBox and TCustomDesignControl, and indirectly for TCustomFrame and TCustomForm.

Prevents recursive updates, True while an update is already in progress.
Hides scroll bars with valid handles.
Aligns the controls which have the class instance as their parent.

Calls the inherited method to align the specified control and its children to the parent control. Ensures that the page, range, and position in the scroll bars are recalculated when AutoScroll is enabled and both HorzScrollBar and VertScrollBar are in use.

TWinControl.AlignControls
Control aligned in the method.
Client rectangle used in the operation.
Indicates if automatic scrolling is enabled for the control.

AutoScrollEnabled is a Boolean function which indicates if automatic scrolling is enabled for the control. The return value is True when the control is NOT automatically resized, or used as a dock site by an active docking manager.

Use the AutoSize property to enabled or disable automatic control resizing. Set the UseDockManager property to False to disable use of the DockSite for the control.

True when not automatically resized or used as a dock site.
Sets or resets the ranges used for scroll bars in the control.
Used in the implementation of the ComputeScrollbars method.
Creates the window handle for the control.

Ensures that the scroll bar page, range, and visibiity are established when the handles for the windowed control are created. Temporarily disables auto-sizing in the method, and re-enables auto-sizing prior to exit. Calls the inherited method to create the window and its handles.

TWinControl.CreateWnd
The origin for the physical client area.
TControl.GetClientScrollOffset
The scroll bar Positions, or (0,0) if no scroll bars in use.
Returns the full virtual ClientRect.
TControl.GetLogicalClientRect
Also updates scroll bars if needed.
TControl.DoOnResize
Calculates the size of the client area for the control excluding visible scroll bars.
TControl.Height TControl.Width TControl.ClientHeight TControl.ClientWidth
Width of the client area.
Height of the client area.
Performs actions needed to handle WMSize messages.

WMSize is a procedure used to perform actions needed to handle WMSize messages for the control. WMSize calls the inherited WMSize method to set the bounds for the control, optionally using the bounds from the parent control.

WMSize provides support for setting the window state based on size messages that originate in the LCL interface, and calls Resizing to realize the new window state.

Message examined in the method.
Delegates scroll messages to the horizontal ScrollBar.
Delegates scroll messages to the vertical ScrollBar.
Updates Page, AutoRange, IsScrollBarVisible, and returns True when changed.
True when something has been changed in the scroll bar settings.
Sets the value for the AutoScroll property.

When the property is changed to True, the UpdateScrollBars method is called to calculate the page, range, and visibility for HorzScrollBar and VertScrollBar. When changed to False, the HideScrollbars method is called to reset the page, range, and visibility for the scroll bars. If the BoundsRect is updated in either method, the original value is restored prior to exit.

New value for the property.
Performs actions when the component has been loaded from the LCL streaming mechanism.

Loaded is an overridden method in TScrollingWinControl, and calls the inherited method on entry. It calls UpdateScrollBars to compute the page, auto ranges, and visibility for the scroll bars when AutoScroll is enabled.

TWinControl.Loaded
Performs actions needed when the control processes the WMSize message.

Resizing is an empty implementation in TScrollingWinControl. It must be implemented in a descendent class.

Indicates whether scroll bars are automatically displayed or hidden when needed.

AutoScroll is a Boolean property which indicates if scroll bars are automatically displayed or hidden on the control as needed. The default value for the property is False.

Changing the value for the property causes the Visible property in both HorzScrollBar and VertScrollBar to be updated (if needed). When set to True, the UpdateScrollBars method is called to calculate the page, range, and visibiity for the scroll bars. When set to False, the HideScrollbars method is called to reset and hide the scroll bars (when assigned).

Sets the value for the AutoSize property.
TControl.AutoSize
New value for the property.
Constructor for the class instance.

Create is the overridden constructor for the class instance, and calls the inherited method on entry. It allocates resources needed for the VertScrollBar and HorzScrollBar properties, sets the default value in AutoScroll to False, and sets the initial bounds for the class instance.

Owner of the class instance.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. Destroy frees resources allocated for the HorzScrollBar and VertScrollBar properties. Destroy calls the inherited destructor prior to exiting from the method.

Initializes or updates the scroll bars for the control.
Ignores recursive calls.
Tells the widget to scroll the client area relative.
The still visible part doesn't deserve a repaint (optimization).
Aligns the specified control to its parent and scrolls it into view.

ScrollInView is a method used to align and scroll the control in AControl into the visible area for the scrolling window control. No actions are performed in the method under the following conditions:

- AControl has not been assigned (contains Nil).
- The control is not the Parent (or ancestor) for AControl.
- Neither horizontal nor vertical scroll bars are displayed for the control.

The origin for AControl relative to its Parent is determined by calling the ClientToParent method. OffsetRect is called to apply the offset to the display rectangle for AControl. The adjusted coordinates are used to reposition the visible scroll bars so that AControl is visible in the client area for the scrolling window control.

TControl.ClientToParent OffsetRect
Control to make visible in the scrolling window control.
The horizontal scroll bar for the control.

HorzScrollBar is a TControlScrollBar property with the horizontal scroll bar for the scrolling window control. The scroll bar is displayed for the control when its Visible property is True, or when Width is larger than the ClientWidth for the control and AutoScroll is enabled.

TControl.ClientWidth TControl.Width
The vertical scroll bar for the control.

VertScrollBar is a TControlScrollBar property with the vertical scroll bar for the scrolling window control. The scroll bar is displayed for the control when its Visible property is True, or when Height is larger than the ClientHeight for the control and AutoScroll is enabled.

TControl.ClientHeight TControl.Height
Implements a windowed control with scroll bars.

TScrollBox is a TScrollingWinControl descendant that implements a windowed control with scroll bars. TScrollBox sets the visibility for properties inherited from the ancestor class. TScrollBox includes an overridden constructor which sets the default values for properties in the class instance.

Constructor for the class instance.

Create is the overridden constructor for the class instance. It calls the inherited method on entry, an updates the component and control style flags as needed for the class instance. It sets the default values for the following properties:

- AutoScroll (True)
- BorderStyle (bsSingle)

TScrollingWinControl.Create
Owner of the class instance.
Indicates whether scroll bars are automatically displayed or hidden when needed.

AutoScroll is a Boolean property which indicates if scroll bars are automatically displayed or hidden on the control as needed. The default value for the property is True in TScrollBox.

Changing the value for the property causes the Visible property in both HorzScrollBar and VertScrollBar to be updated (if needed). When set to True, the UpdateScrollBars method is called to calculate the page, range, and visibiity for the scroll bars. When set to False , the HideScrollbars method is called to reset and hide the scroll bars (when assigned).

TScrollingWinControl.AutoScroll TScrollingWinControl.UpdateScrollbars TScrollingWinControl.HorzScrollBar TScrollingWinControl.VertScrollBar
Line style used to draw the border around the control.

The default value for the property is bsSingle in TScrollBox.

TWinControl.BorderStyle
Indicates if the control uses the background from its Parent control.

ParentBackground is a Boolean property which indicates if the background for the Parent control is drawn as the background for the current control instance. The default value in TScrollBox is False.

ParentBackground is True when csParentBackground is included in the ControlStyle property. Setting the value in ParentBackground causes ControlStyle to be updated to include or exclude the csParentBackground enumeration value; it is included when True.

TWinControl.ParentBackground TControl.ControlStyle TControl.Parent TControlStyle TControlStyleType
Provides a designer surface for scaling and layout of its child controls.

TCustomDesignControl is a TScrollingWinControl descendant which provides a designer surface used for scaling and layout of its child controls.

Properties are provided to set the display density (Pixels Per Inch) for design-time and run-time usage, and to Scale child controls. Methods are also provided to use TLayoutAdjustmentPolicy to layout and to re-size the child controls.

An overridden Loaded method is provided to adjust the design-time PPI (when scaling is enabled in the application).

TCustomDesignControl is used as the ancestor for TCustomFrame and TCustomForm.

Sets the value for the DesignTimePPI property.
New value for the property.
Sets the value for the Scaled property.
New value for the property.
Applies size and layout changes to the design surface and its Parent control.

DoAutoAdjustLayout is a procedure used to perform actions needed to apply size and layout changes to the design surface and its Parent control.

DoAutoAdjustLayout adjusts the height and width for the design surface by the specified scaling factors. Similarly, the BorderSpacing and Constraints in the control are adjusted using the scaling factors. Finally, the SetBounds method is called to apply the new values for Height and Width to the design surface.

No actions are performed in the method when the Parent property has not been assigned (contains Nil). In addition, no actions are performed when AMode omits the lapAutoAdjustWithoutHorizontalScrolling and lapAutoAdjustForDPI enumeration values.
TControl.AutoAdjustLayout TControl.Constraints TControl.BorderSpacing TControl.Parent
TLayoutAdjustmentPolicy applied in the method.
Horizontal scaling factor applied in the method.
Vertical scaling factor applied in the method.
Constructor for the class instance.

Create is the overridden constructor for the class instance. Create calls the inherited method using the value in TheOwner as the the owner of the class instance. Create sets the default values for the following properties:

- Scaled
- DesignTimePPI
- PixelsPerInch

When scaling is enabled in the Application, the value in DesignTimePPI is used as the PixelsPerInch setting in the Font property.

TControl.Font
Owner of the class instance.
Applies a new display density (Pixels Per Inch) for a layout policy to the control.

AutoAdjustLayout is used to set the value in the PixelsPerInch property to the value specified in AToPPI for the lapAutoAdjustForDPI layout policy. AutoAdjustLayout calls the inherited method.

No additional actions are performed in the method when AMode contains a value other than lapAutoAdjustForDPI.
Layout policy to use for the design surface.
Original display density setting.
New display density setting.
Original form width.
New form width.
Design-time Pixels Per Inch for the designer surface.

DesignTimePPI is an Integer property that contains the display density (or Pixels Per Inch) used on the designer surface. The default value for the property is 96.

The property value is normally set when the component is loaded using the LCL streaming mechanism. It can be assigned at design-time to the value in ADesignTimePPI only when the new value matches the display density for the current Screen where the designer surface is used. The value can be changed at run-time, but the programmer must ensure that the value is valid for the intended usage.

An EInvalidOperation exception is raised if an invalid value is specified at design-time.

When scaling is enabled in the Application, the value in DesignTimePPI is assigned to the Font for the designer surface.

Use PixelsPerInch to access the run-time display density for the designer surface.

TControl.Font
Run-time Pixels Per Inch for the designer surface.
Indicates if the design surface is scaled to reflect changes in display density (Pixels Per Inch).
The base type for TFrame.

TCustomFrame is a TCustomDesignControl descendant which implements the base class for TFrame. A Frame is a named container for related components. Groups of controls can be place on a frame, and re-used in your applications.

A Frame has behavior very similar to a Form. Their unique ability is that they can be embedded into forms or other frames in the designer. Like forms, they are stored in two separate files: the code is stored in a .pas unit file, and the design is stored in a .lfm file.

Frames can be created and designed in the Lazarus IDE by creating a new Frame module, and using the unit in your application. An existing frame can be added using the TFrame component on the Standard tab in the Lazarus IDE; you will be prompted for the TFrame class to use for the component.

Frames can also be created entirely in code at run-time. They do not have to be installed in the Lazarus IDE. One drawback is that complex inheritance hierarchies for TFrame classes can be problematic; they do not propagate changes to all derived frames in a multi-level inheritance tree.

Adds the specified list of Actions to the Parent form for the frame class.
No actions are performed in the method when a Parent form has not been assigned for the class instance.
List of Actions added in the method.
Removes the specified list of Actions from the Parent form.
No actions are performed in the method when a Parent form has not been assigned for the class instance.
List of Actions removed in the method.
Implements reading the Left property for the designer surface.
Implements reading the Right property for the designer surface.
Implements writing the Left property for the designer surface.
Implements writing the Top property for the designer surface.
Invokes Proc for all Controls and also for all Components without a Parent.
TWinControl.GetChildren
The callback method.
Components are enumerated only if Root=Self.
Also handles add/remove of ActionLists.
TComponent.Notification TControl.Notification
Component for the notification.
Operation for the notification.
Sets the value for the Color property.

SetColor is an overridden method in TCustomFrame used to set the value for the Color property. It calls the inherited method on entry.

When the value for the Color property is set to clDefault, or has the same value as the Color property in Parent, no additional actions are performed in the method. Otherwise, the value in ParentBackground is set to False.

TControl.Color
New value for the property.
Sets the value for the Parent property.
Also updates the ActionLists, and performs automatic layout adjustments when needed.
TControl.Parent TControl.SetParent
Value assigned to the Parent property.
Sets the value for the ParentBackground property.
New value for the property.
Handles the CM_PARENTCOLORCHANGED message for the control.
TControl.CMParentColorChanged
Control message handled in the method.
Defines non-published properties that are included in LCL component streaming.

DefineProperties is an overridden method used to include non-published properties in the values read and written during LCL component streaming. In TCustomFrame, design-time information for the Top and Left coordinates for the frame are included (when available) in the specified TFiler instance.

TControl.DefineProperties
TFiler instance where property definitions are added.
Updates control style flags to reflect the transparency for the frame.

UpdateOpaque is a method used to update ControlStyle flags to reflect the transparency for the frame. When ParentBackground is True, the value csOpaque is excluded from the ControlStyle property to allow the frame to be drawn with transparency. When set to False, csOpaque is included in ControlStyle.

UpdateOpaque is called when the value for the ParentBackground has been changed, and when the CM_PARENTCOLORCHANGED control message is handled for the frame.

TControl.ControlStyle
Constructor for the class instance.

Create is the overridden constructor for the class instance. Create calls the inherited method using AOwner as the owner for the class instance. Create sets the ControlStyle property to the following enumeration values:

- csAcceptsControls
- csCaptureMouse
- csClickEvents
- csSetCaption
- csDoubleClicks
- csParentBackground

Create uses the default size for its class type to set the initial bounds for the control.

Raises an EResNotFound exception at run-time if the ClassType for the class instance is not derived from TFrame.
TComponent.Create
Owner of the class instance.
Indicates if the control uses the background from the parent.

The write access specifier is overridden in TCustomFrame. It calls the inherited method on entry.

If the new property value is True and ParentColor is True, the color assigned to the Parent control is stored in the Color property. Otherwise, Color is set to the value clDefault. The UpdateOpaque method is called to adjust the control style flags for the control.

The default value for the property is True.

TWinControl.ParentBackground TControl.Color TControl.Parent
Frames can be designed like Forms and used like custom controls, without much coding or installation in the IDE.

TFrame is a TCustomFrame descendant which implements a named container for related components. Groups of controls can be place on a frame, and re-used in your applications.

A Frame has behavior very similar to a Form. Their unique ability is that they can be embedded into forms or other frames in the designer. Like forms, they are stored in two separate files: the code is stored in a .pas unit file, and the design is stored in a .lfm file.

Frames can be created and designed in the Lazarus IDE by creating a new Frame module, and using the unit in your application. An existing frame can be added using the TFrame component on the Standard tab in the Lazarus IDE; you will be prompted for the TFrame class to use for the component.

Frames can also be created entirely in code at run-time. They do not have to be installed in the Lazarus IDE. One drawback is that complex inheritance hierarchies for TFrame classes can be problematic; they do not propagate changes to all derived frames in the entire inheritance tree.

TFrame contains a new property which indicates the LCL (Lazarus Component Library) version number used in the container. An overridden constructor is also introduced to initialize the value in the LCLVersion property. TFrame sets the visibility for properties defines in ancestor classes.

Owner of the class instance.
Represents a visual element in a window title bar; depends on window manager support.

biSystemMenu
  The form has a System menu (Maybe not all windowmanager supports this)
biMinimize
  The form has an minimize button
biMaximize
  The form has a maximize button
biHelp
  When you click this button a Question Cursor appears, and the help routines are called if you click on an control

Window has a system menu.
Window has an Minimize button.
Window has an Maximize button.
Window has an Help button.
The preferred monitor for showing a form.

When a form is not assigned to a specific monitor, assume the following display context:

dmDesktop
  No attempt to choose specific monitor
dmPrimary
  On the primary monitor
dmMainForm
  On the same monitor as the main form; if there is no main form then use dmPrimary behavior
dmActiveForm
  On the same monitor as the currently active form; if there is no active form then use dmMainForm behavior

Place the form on the full desktop.
Place the form on the primary monitor.
Place the form on the same monitor as the main form. If there is no such form then use the primary monitor.
Place the form on the same monitor as the currently active form. If there is no such form then use the primary monitor.
Form state flags.

The form states are:

fsCreating
  initializing (form streaming)
fsVisible
  form should be shown
fsShowing
  form handling WM_SHOWWINDOW message
fsModal
  form is modal
fsCreatedMDIChild
  not yet implemented
fsBorderStyleChanged
  border style changed before window handle creation
fsFormStyleChanged
  form style is changed before window handle creation
fsFirstShow
  form is shown for the first time
fsDisableAutoSize
  disable auto-size

initializing (form streaming).
form should be shown.
form handling WM_SHOWWINDOW message.
form is modal.
not yet implemented.
border style changed before window handle creation.
form style is changed before window handle creation.
form is shown for the first time.
disable auto-size.
The set of form state flags.
Dummy type for the values that can be returned as a modal result.

Even though the type is defined as an integer, only the defined constant values should be used (mrOK, mrCancel, et. al.).

TForm Notification handler types.
Notified on first form Show.
Notified on form Close.
Notified after form Create.
How a form is represented in the TaskBar.
Uses the default rules from the platform for showing the form in the TaskBar.
Always show the form in the TaskBar.
Never show the form in the TaskBar.
Defines the handling performed for a parent window in forms and dialogs.

TPopupMode is an enumerated type with values that specify how the parent is determined for a form or dialog. TPopupMode is the type used for the PopupMode property in TCustomForm.

modal: align to active form or main form; non-modal: no window parent.

For modal windows, the handle has to be recreated in ShowModal. If this is not wanted, please use explicitly pmAuto before calling ShowModal.

modal and non-modal: align to active form or main form.
modal and non-modal: align to PopupParent or main form.
Type used for an OnClose event handler in a form.

Closing a form can have several meanings:

caNone
  Do nothing (don't close).
caHide
  Hide the form (default for modal forms).
caFree
  Destroy the form.
caMinimize
  Minimize the form (MDI child default).

The handler can set CloseAction to the desired value for the action.

The form that received an Close request.
Set this to caNone, to prevent the form from closing.
Specifies an OnCloseQuery handler event handler.

TCloseQueryEvent is an object procedure type which specifies the event handler signalled to determine if a form can be closed.

TCloseQueryEvent is the type used to implement the OnCloseQuery property in TCustomForm. An application must implement an object procedure using the signature for the event handler to allow responding to the notification.

The form that received an Close request.
Set to False to deny closing.
Type used for an OnDropFiles event handler.

TDropFilesEvent is an object procedure which specifies an event handler triggered when files are dropped on a drag and drop-enabled control.

TDropFilesEvent is the type used to implement the OnDropFiles property in TCustomForm and TApplication. Applications must implement a procedure using the signature for the event handler, and assign it to the property.

The control that received the dropped files.
The list of the dropped files.
Type used for an OnHelp event handler.

THelpEvent is an object function which specifies an event handler signalled when Help is requested in an application or form. THelpEvent is the type used to implement the OnHelp event handler in TCustomForm and TApplication. Applications must implement a function using the signature for the event handler, and assign it to the property.

Indicates if the help request is satisfied by the event handler; False causes the default help handler for the application to be used.
Help command type requested; either HELP_CONTEXT or HELP_COMMAND.
Context data for the help request.
False suppresses help display.
Type used for an OnShortcut event handler.

A shortcut handler is invoked when a key is pressed, before any other processing. It can interpret the key as an shortcut and act accordingly. In this case, Handled should be set to True to prevent further processing of the key.

The key event message.
Set Handled to True to prevent further processing of the key.
Specifies an event handler signalled when a modal message dialog is completed.

TModalDialogFinished is an object procedure which specifies an event handler signalled when a modal message dialog is completed. The AResult argument contains the modal result constant returned from the message dialog.

TModalDialogFinished is the type used to implement the TCustomForm.OnShowModalFinished and TApplication.OnMessageDialogFinished properties.

TObject instance for the event notification.
Modal result value from the dialog.
The base type for TForm classes.

TCustomForm is a TCustomDesignControl descendant that implements the base type for TForm classes.

Forms represent a window or a dialog used as the user interface for a GUI application. It is a container where visual components (such as buttons, labels, edit fields, images, etc.) can be placed. It is also a designer surface which provides design-time support for configuration and layout of the content placed on the form.

TCustomForm acts an abstraction layer which masks implementation-specific routines required for the various widgetsets supported in the Lazarus Component Library (LCL). Methods and properties are provided which interact with the underlying Operating System or platform, and provide a common API for form-related operations.

Lists of installed Form notification handlers.
Used to track Focus changes (Enter/Exit events).
Tries to resolve stDefault in ShowInTaskBar using Application settings.

Calls ShowInTaskBar to get the visibility of an icon for the form.

When the return value is stDefault (or when called at design-time), the TaskBarBehavior property in Application is taken into consideration to get the actual return value. If the application displays a single button for the executable and its forms, the return value is set to stNever. If multiple buttons can be displayed in the task bar, the value stAlways is used. If the Application uses the value tbDefault, the value stDefault is retained in the return value.

Effect visibility for the form icon in the task bar.
Gets the value for the Monitor property.
Value for the property.
Indicates whether Form properties should be stored in the stream.

IsForm is used as the storage specifier for selected properties in the class instance. Always returns True in TCustomForm.

True when the value for the various properties should be included in the LCL streaming mechanism.
Closes a modal form.

CloseModal is a procedure which attempts to close a form that has been displayed by calling the ShowModal method.

CloseModal calls CloseQuery to determine the action performed in the method. When CloseQuery returns True, the close action is set to caHide and the OnClose event handler is signalled when assigned. Form handlers are notified of the close action.

When CloseQuery is False, the close action is used to determine how the request is handled. If the CloseAction is caNone, the value in ModalResult is set to 0 (zero). If the CloseAction is caFree, the Release method is called to allow the Application to free the form component.

If an exception occurs in the method, the value in ModalResult is set to 0 (zero) and the Application.HandleException method is called.

CloseModal
does not forward the action to the widgetset class; that is performed in the ShowModal method to ensure it is executed in the widgetset class.
Destroys the form icons.
Loads the new form icons, and notifies the widgetset and all forms.
Performs actions needed for delayed window move, resize, show, and activate messages.

DelayedEvent is a mechanism used to reduce the number of move, resize, show, and activate messages that occur for forms and their child controls.

DelayedEvent discards duplicate calls to the method; only the most recent message is processed. It is used in conjunction with the QueueAsyncCall method in TApplication. DelayedEvent decrements an internal counter used to track the number of pending delayed event messages. When the counter reaches zero (0), the message is applied.

When WindowState is changed to wsNormal, the window origin or size is restored. For delayed OnChangeBounds and OnChangeBounds messages, the DoOnShow and/or Activate methods are called when the form is Active. If the form has not already been displayed and activated, the DoOnResize or the DoOnChangeBounds method is called for the corresponding delayed message.

An integer pointer to the data for the event; not used in the current implementation.
Remembers the last focused control.
Called when the Focus changed.

SetWindowFocus is a procedure used to ensure that the active control in the form instance has the input focus when the forms receives focus. At run-time, the control in ActiveControl (when assigned) is used as the active control. At design-time, the active control is the design surface for the current form instance.

No actions are performed in the method when a handle has not been allocated for the active control, or the control cannot be focused.

SetWindowFocus calls the SetFocus routine in LCLIntf to change the focus to the handle for the active control, and when successful calls the Perform method in the control to post the CM_UIACTIVATE control message.

SetWindowFocus is used in the implementation of the SetFocus and SetActive methods.

Sets the value for the WindowState property.

SetWindowState sets the value for the WindowState property. Calls the ShowWindow routine at run-time when Showing is set to True.

New value for the property.
Adds a form notification handler with the specified type and code.

AddHandler is a procedure used to add a form notification handler to the list of handlers in the form instance.

HandlerType is a TFormHandlerType enumeration value that defines the situation(s) where the form handler can be executed. See TFormHandlerType for more information about values in the enumeration.

Handler is a TMethod record with pointers to the code and optional data executed when the handler is invoked.

AsFirst indicates if the handler should be inserted as the initial handler in the method list (when True), or appended to the end of the list (when False).

AddHandler calls RaiseGDBException to raise an exception when the pointer to the Code in Handler has not been assigned.

AddHandler ensures that a TMethodList exists for handlers using the value in HandlerType, and calls the Add method in the TMethodList to store the Handler at the position needed for AsFirst.

AddHandler is called from the implementation of more specialized methods like AddHandlerClose, AddHandlerCreate, and AddHandlerFirstShow.

Raises a catchable exception if the Code property has not been assigned for the TMethod instance in Handler. Raised with the message 'TCustomForm.AddHandler'.

TMethodList TMethod
Form handler type added in the method.
Code to execute for the form handler.
True if the new form handler becomes the first handler in the list of handlers.
Removes a form notification handler of the specified type.
Returns the first control in the form Tab order.
Called when the main menu has been changed.

Ensures that handles for the Menu are valid for the form display style. The Menu is not displayed at run-time for a modal dialog form (BorderStyle is set to bsDialog); in this case, the DestroyHandle method in Menu is called to free the Handle for the Menu. (This is Delphi compatible).

The WindowHandle for the Menu is set to the Handle property from the form instance.

No actions are performed in the method if the Handle has not been allocated, or when Menu has not been assigned for the form.

Updates the widgetset class with the effective form visibility in the task bar.

Uses values in ShowInTaskBar and the TaskBarBehavior setting in Application to determine the effective visibility for the form in the task bar. Calls the SetShowInTaskbar method in the widgetset class to update the effective form visibility.

No actions are performed in the method for the following conditions:

- When the form instance is the MainForm for the Application (it is handled by the application).
- When the handle has not been allocated for the form instance.
- When the form has a Parent control, or has been configured as a MDI Child form (FormStyle is fsMDIChild).
- The form has not been made visible (Showing is False).

Handles the LM_ACTIVATE message which activates or deactivates the form.

Calls SetActive to update the value in the Active property to reflect the value for the Active member in Message.

When the form is being de-activated, the Deactivate method in Application is called. Otherwise, the Activate method in Application is called. The UpdateShowInTaskBar method is called ShowInTaskBar to determine the effective visibility for the form in the task bar.

Control message examined in the method.
Handles the LM_CLOSEQUERY message used to close the window.

Calls the Close method to process and apply the ModalResult and CloseAction for the form. Sets the Result member in Message to 0 (zero) to indicate that WndProc should ignore the message; it has been handled in this method (and Close).

Control message examined in the method.
Handles the LM_HELP window message for the form.

No actions are performed in the method at design-time, or when values have not been assigned to the HelpInfo member in Message.

When HelpInfo has a HELPINFO_WINDOW context type, FindControl is called to locate and display the help for the control with the item handle in Message. When HELPINFO_MENUITEM is the context type, GetHelpContext in Menu is called to locate the control ID in Message. If not found, the item handle in Message is used. As a default, the value in the Context property is used to display the context help.

Message examined in the method.
Handles the LM_SHOWWINDOW window message for the form.

No actions are performed in the method when the form has already been made visible (FormState contains the value fsShowing).

Updates FormState to include the value fsShowing. Calls DoShowWindow to focus a control on the form (when needed). Removes fsShowing from FormState prior to exiting from the method.

Re-implements the method from the ancestor class; does not call the inherited method.

Message examined in the method.
Handles the LM_SIZE window message for the form.

Re-implements the method from the ancestor class.

Ensures that auto-sizing is disabled for a size message for a top-level form (where Parent is not assigned) or from the LCL interface. This is done by including the value fsDisableAutoSize in the FormState property.

Calls the inherited method to apply the width, height, and window state values in Message.

Message examined in the method.
Handles the LM_WINDOWPOSCHANGED window message for the form.

Re-implements the method from the ancestor class.

Ensures that auto-sizing is disabled for a position message to a top-level form (where Parent is not assigned), or from the LCL interface when new height or width values are provided. This is done by including the value fsDisableAutoSize in the FormState property.

Calls the inherited method prior to exit to apply the position and bounds for the form.

Message examined in the method.
Handles the CM_BIDIMODECHANGED control message for the form.

Re-implements the method from the ancestor class. Calls the inherited method on entry using the value in Message to set the BiDi and adjust the size for the control.

Ensures that all components owned by the form are notified of the change to the BiDiMode property. This is needed for menus on the form. A TLMessage instance is constructed with the CM_PARENTBIDIMODECHANGED message and displatched to all of the Components on the form not derived from TWinControl. TWinControl handles the notification for its descendants. Alignment is temporarily disabled during the process, and re-enabled prior to exiting from the method.

Control message examined in the method.
Handles the CM_PARENTBIDIMODECHANGED control message for the form.

Sets the BidiMode property to the value in Parent when ParentBiDiMode is True and Parent has been assigned. When Parent has not been assigned, the BiDiMode property in Application is copied to the form instance.

Control message examined in the method.
Handles the CM_APPSHOWBTNGLYPHCHANGED control message for the form.

Ensures that controls with a Glyph are notified when a change has occurred to a button glyph. Calls NotifyControls to broadcast Message to all Controls on the form.

Control message examined in the method.
Handles the CM_APPSHOWMENUGLYPHCHANGED control message for the form.

Ensures that menus and menus items are notified of a change to a Glyph. Dispatches the value in Message to all Components on the form.

Control message examined in the method.
Handles the CM_ICONCHANGED control message for the form.

Frees and re-creates handle(s) for icons used on the form, and notifies the widgetset class by calling its SetIcon method.

Control message for the notification.
Handles the CM_RELEASE control message for the form.

Calls the Free method to destroy the form instance.

Control message for the notification.
Handles the CM_ACTIVATE control message for the form.

Ensures that the Menu for the MainForm in the Application is merged into the Menu for the form instance when FormStyle is fsMDIChild. This action is not performed at design-time, or when the MainForm or the Menu for the Application has not been assigned.

Calls Activate to signal the OnActivate event handler (when assigned) if needed.

Control message for the notification.
Handles the CM_DEACTIVATE control message for the form.

This message occurs when the form loses focus within the application.

Calls the Deactivate method to signal the OnDeactivate event handler (when assigned). Ensures that the Menu merged to the application MainForm during activation is removed from the Menu for the Application. This action is not performed at design-time, or when Menu has not been assigned. It applies to a form using the fsMDIChild form style in an application using the fsMDIForm style in its MainForm.

Control message processed in the method.
Handles the CM_SHOWINGCHANGED control message for the form.

Uses the value in Showing to determine whether the DoShow or the DoHide method is called. When Showing is True, the DoShow method is called to signal the OnShow event handler (when assigned) if needed. When Showing is False, the DoHide method is called to signal the OnHide event handler (when assigned).

If either event handler raises an Exception, it is ignored when HandleShowHideException is set to True. It is re-raised when HandleShowHideException is False.

Calls the inherited method prior to exit to notify the widgetset class of the window state change, and to update window control flags for the form.

Control message processed in the method.
Handles the LM_DPICHANGED window message for the form.

Calls AutoAdjustLayout to apply the DPI setting in Message. This action is performed when:

- The Parent for the form has not been assigned.
- Scaled is enabled for both the Application and the form instance.
- The DPI setting in Message is different than the PixelsPerInch value for the form.

Problem (Windows): if the form is shown the first time on a secondary monitor with a different DPI settings, the WM_DPICHANGED message is sent within UpdateBounds when BoundsLockCount>0 which means the bounds are not scaled. We force to update the bounds. See issue 32162. (A better solution is welcome.)

Window message handled in the method.
Member used to store the action lists associated with the form.
Chooses the active control when the form becomes visible at run-time.

Calls a private method to locate the first visible and enabled control in the tab order for the form. Sets the value in ActiveControl to the control instance located in the method.

No actions are performed in the method at design-time, when ActiveControl has already been assigned, or when the form instance has a Parent.

DoShowWindow is called from the WMShowWindow method where the LM_SHOWWINDOW window message is handled for the form.

Notifies the OnActivate event handler.

Activate is a procedure used to signal the OnActivate event handler (if assigned) when the form is activated. Activate is called when the CM_Activate message is handled for the form.

Activate uses an internal member to determine whether the form is being displayed for the first time, or following a change of focus between forms. No actions are performed in the method when the form is being displayed for the first time and the WindowState property contains wsMaximized or wsFullScreen.

Use OnShow to respond to the event notification performed when the form is displayed for the first time.

Use OnChangeBounds or OnResize to respond to delayed changes to the form bounds (position) or resize events.

TControl.OnChangeBounds
An empty implementation in TCustomForm.
Can be implemented in a descendant to perform actions needed when the active form is changed. Just like Delphi VCL.
Excludes borders from the given rectangle.

AdjustClientRect is an overridden method in TCustomForm which re-implements the method from the ancestor class. It is used to decrease the width and height for the client rectangle specified in Rect by the number of pixels in the BorderWidth property. It is used in the AlignControls method, and when auto-sizing is performed for Controls.

TWinControl.AdjustClientRect
Client rectangle adjusted in the method.
Increments the form update counter, and disables auto-sizing on the initial update lock.

Used with the EndFormUpdate method to manage auto-sizing during form updates. For the initial call to BeginFormUpdate, DisableAutoSizing is called to suspend auto-sizing.

Use EndFormUpdate to decrement the update counter. When the update count reaches 0, auto-sizing is re-enabled.

TControl.DisableAutoSizing TControl.EnableAutoSizing
Implements the storage specifier for the Color property.
TControl.Color
True when Color has value other than clDefault or clBtnFace.
Initializes parameters used to create the handle for the form instance.

CreateParams is used to initialize parameters needed to create the handle for the form instance.

CreateParams is an overridden procedure in TCustomForm, and calls the inherited method on entry. CreateParams ensures that values in the Params argument are valid. This includes setting the realized parent form and window handle for a form which is not the main form in the application. Style flags are also updated to indicate how the form is displayed in the task bar.

TWinControl.CreateParams
Values examined and updated in the method.
Creates the handle for the widgetset class and updates it Menu and Icons.

CreateWnd is an overridden method in TCustomForm used to create (or re-create) the Handle for the widgetset class. It sets the initial values for FormState, and calls the inherited method to handle auto-sizing and scroll bars.

CreateWnd ensures that a handle is allocated for the Menu and the Handle for the form is used as its WindowHandle. The CM_ICONCHANGED control message is performed to (re-)create handles for menu glyphs, and to post the changes to the widgetset class.

TScrollingWinControl.CreateWnd TWinControl.CreateWnd
Performs actions when the form loses focus.

Called when the form loses focus in the application. Signals the OnDeactivate event handler (when assigned). Called from the CMDeactivate and WndProc methods.

Notifies handlers of the close action for the form.

DoClose is a method used to notify close handlers for the form instance of the action requested in the CloseAction parameter.

It is called from the Close method for a form that is not displayed as a modal dialog; i. e. FormState does not contain fsModal. It occurs after CloseQuery (and OnCloseQuery) have been called to determine if the form can in fact be closed, and the CloseAction has been set for the form style.

DoClose signals the OnClose event handler (when assigned) to allow the form instance to modify the CloseAction argument. It iterates over the close handlers in the form instance, and signals each of the TCloseEvent instances in the method list using CloseAction as an argument.

Close action to perform for the from instance.
Notifies the create handlers for the form instance.

DoCreate is a method used to signal the create handlers for the form instance. DoCreate signals the OnCreate event handler (when assigned) to perform any actions needed for the new form instance. DoCreate also signals other create handlers to perform the methods using the current form instance as an argument.

If an Exception occurs in one of the event handlers, it is handled in the method when HandleCreateException returns True. When it returns False, the exception is re-raised in the method.

DoCreate calls LockRealizeBounds on entry to disable sending bounds changes to the widgetset class. UnlockRealizeBounds is called prior to exit to re-enable sending bounds changes to the widgetset class.

DoCreate is a called from the AfterConstruction method after the initial bounds for the form have been set, and before scaling and automatic layout adjustment are performed (if needed) for the new form instance.

TWinControl.LockRealizeBounds TWinControl.UnlockRealizeBounds
Signals the OnDestroy event handler for the form instance.

DoDestroy is a method used to signal the OnDestroy event handlers assigned for the form instance. If an Exception occurs in the event handler, it is handled in the method when HandleDestroyException is set to True. When set to False, the exception is re-raised in the method.

DoDestroy is called from the BeforeDestruction method, and allows the application to perform actions needed before the form instance is physically freed. It is called after the form has been removed from the focus list for the Screen, hidden by calling the Hide method, and merged menu items have been removed from the MainForm for the Application.

Signals the OnHide event handler for the form instance.

Called from the CMShowingChanged method when Showing is set to False.

Signals the OnShow event handler when needed.

No actions are performed in the method when a maximized or full-screen window (WindowState contains wsMaximized or wsFullScreen) is displayed for the first time. It signals the OnShow event handler (when assigned) to perform the event notification.

DoShow is called from the DelayedEvent method in response to queued OnResize or OnChangeBounds events, and from the CMShowingChanged method when Showing is set to True.

TWinControl.Showing TControl.Parent
Unlocks form updates; used with BeginFormUpdate.
When the update counter reaches zero, FormEndUpdated is invoked to realize the pending changes.
TWinControl.FormEndUpdated
Indicates if an exception in the OnCreate event handler is handled by the application.

HandleCreateException is a Boolean function which indicates if an exception raised in the OnCreate event handler is handled in the form instance. The return value is True when the Application.CaptureExceptions property is set to True; the HandleException method in Application is called to notify its exception handlers of the exception. When the return value is False, the exception is re-raised in the caller.

HandleCreateException is called from the DoCreate method.

True when the exception is handled by the application.
Placeholder for exception handlers in derived classes.
By default the Application exception handler is invoked.
True when the exception was handled.
Placeholder for exception handlers in derived classes.
By default the Application exception handler is invoked.
True when the exception was handled.
Initializes the widget, also for AlphaBlend and AllowDropFiles.
TWinControl.InitializeWnd
Performs actions when the component has been loaded using the LCL streaming mechanism.

Loaded is an overridden method in TCustomForm.

It disables alignment in the form, and adjusts the PixelsPerInch setting for the Font when it differs from the design-time setting. It is performed when Scaled is enabled for the form and the Application. This action is also performed for any child Controls. Calls the inherited Loaded method, and re-enables alignment for the form instance.

Ensures that the ActiveControl (when assigned) can receive focus. ActiveControl is set to Nil if the control cannot be focused for the form instance. Sets the Visible property to True when FormState contains the value fsVisible.

TComponent
Called when handles for child control are created in the form instance.

ChildHandlesCreated is called after all handles for child controls are created. When this is a top-level form (Parent is Nil), the ParentFormHandleInitialized method is also called.

TWinControl.ChildHandlesCreated
Handles the notification when a component is added to or removed from the form.

Notification is an overridden method in TCustomForm used to handle the notification when the component in AComponent has been added to or removed from the form instance. Operation is the action performed for the component.

Notification calls the inherited method on entry, and performs additional actions for the ActionList, Menu, and pop-up parent form used in the control.

TControl.Notification
Component for the notification.
Operation performed for the component.
Calls the Paint method using the specified device context in the control Canvas.

PaintWindow is an overridden method in TCustomForm. It re-implements the method from the ancestor class, and does not call the inherited method.

PaintWindow assigns the device context in dc to the Canvas handle. The Paint method is called to signal the OnPaint event handler (when assigned). If a design surface is active for the form instance, its PaintGrid method is called. The Canvas handle is reset to 0 prior to exiting from the method.

TCustomControl.PaintWindow
Device context (Handle) assigned to the Canvas for the form.
Calls the user Alignment handler (AlignControls). Here: NOP for a top-level form.
TControl.RequestAlign
Performs actions needed when the form processes the WMSize message.

Uses the value in State to determine the action required in the method. The LCL interface is used to determine if the window state is valid for the widgetset. When allowed, the following methods are called for the corresponding TWindowState value:

wsMinimized
  Calls the Minimize method in Application, or Restore if the Form is already minimized

If the value in WindowState has been changed, the method honors the value in the Position property if it was set to maximized at design-time. When the OnWindowStateChange event handler has been assigned for the form, it is signalled for the current class instance.

Window state applied in the method.
Here: clip width and height of a top-level form to the monitor WorkArea.
Performs a delayed resize action using the DelayedEvent for the control.
Performs a delayed bounds change using the DelayedEvent for the control.
Moves a top-level form in front or back of all forms.
True for BringToFront.
Sets the value for the Parent property.

SetParent is an overridden method in TCustomForm used to set the value for the Parent property.

SetParent disables auto-sizing before updating the property value. The Handle for the form is destroyed and re-created when Parent is both assigned and Visible.

SetParent ensures that the PixelsPerInch settings for the form instance and its Parent are the same. AutoAdjustLayout is called when the values differ and Scaled has been enabled for both the Parent form and the Application.

SetParent re-enables auto-sizing prior to exiting from the method.

TControl.Parent TControl.SetParent
New value for the property.
Moves the form to the location specified in the Position property.

MoveToDefaultPosition is a method used to move the form instance to the location specified in its Position property. Position indicates the size and relative position for the form instance. See and for information about the property values and their meanings.

MoveToDefaultPosition gets the display rectangle for the form instance. Its dimensions and coordinates are translated to the Monitor and/or relative layout indicated in Position. SetBounds is called to apply the translated origin, height and width to the form instance.

No actions are performed in the method when either Parent or the ParentWindow handle has been assigned for the form instance. No actions are performed in the method when WindowState contains wsFullScreen or wsMaximized.

MoveToDefaultPosition is called from the AllAutoSized, SetRestoredBounds, and UpdateShowing methods. It is also called when a new value is assigned to the Position property.

Configures and position the form when its visibility has been changed.

UpdateShowing is an overridden method used to configure and position the form instance when the visibility for the form has been changed.

When Visible is set to True at run-time, the MoveToDefaultPosition method is called to move the form to the monitor / location in the Position property. This action is not needed (or allowed) at design-time. When FormState indicates it is the first time the form is being displayed, the DoFirstShow method is called to notify event handlers for the form.

UpdateShowing calls the inherited method to update the Handle for the form and the visibility for any child Controls.

If ActiveControl is not assigned, and there is no Parent form, the FindDefaultForActiveControl method is called to locate the first visible and enabled child control on the form. Its Handle is used to focus the control using the LCL SetFocus routine.

Finally, the visibility of the form in the task bar is updated and passed to the widgetset class.

TWinControl.UpdateShowing
Sets the value for the Visible property.

SetVisible is an overridden method used to set the value for the Visible property. It ensures that FormState is updated to reflect the new value for the property. When set to True, fsVisible is included in the FormState property. Otherwise, fsVisible is excluded from FormState. No actions are performed in the method if FormState already already reflects the new value for the property.

SetVisible calls the inherited method to store the new property value, and to perform resizing and control messages as needed. The UpdateVisible method in Application is called to ensure that the application is visible in the task bar when one of its forms is visible.

TControl.SetVisible
New value for the property.
If the the form is about to show, calculate its metrics.

AllAutoSized is an overridden method used to apply the position and layout for a visible form that about to be displayed. AllAutoSized implements the virtual method defined in the ancestor class.

AllAutoSized is called from the DoAllAutoSize method when AutoSize has been enabled, and occurs after the bounds for the form have been calculated. It calls the MoveToDefaultPosition method to move the form to the monitor and relative location in Position.

No actions are performed in the method if the form is already Showing or it is not Visible.

TWinControl.Showing TWinControl.AllAutoSized TWinControl.DoAllAutoSize
Executes handlers using the FirstShow handler type.

Calls CallNotifyEvents in the internal method list for any methods using the fhtFirstShow handler type. The form instance is passed as an argument to the handler(s).

Called from the UpdateShowing method when the form is Visible and its Showing property is changed to True. Occurs after MoveToDefaultPosition has been to called to position the form on its monitor, and after the value fsFirstShow has been included in the FormState property.

TWinControl.Showing
UpdateWindowState is an empty implementation in TCustomForm.

Has an empty implementation in the current LCL version.

Notifies all VisibleChanging handlers.

Calls the inherited method prior to exit. Called prior to setting the new value for the Visible property in a control (or form) in the SetVisible method.

TControl.VisibleChanging
Notifies all handlers when the visibility for the form has been changed.

Calls the inherited method on entry.

When the Screen singleton has been assigned, its NotifyScreenFormHandler method is called to signal all snFormVisibleChanged handlers in the class instance.

Called after a new value has been assigned to the Visible property for the control (or form).

Handled messages include: Activate, SetFocus, KillFocus, Exit, Enter, Window Position Changing, and DrawItem.

WndProc is an overridden method which implements the processing loop for window and control messages received for the form instance. It extends the method from the ancestor class to provide form-specific support for messages including:

LM_SETFOCUS
  Chooses the active control for the form at run-time, and ensures that the control is focused.
CM_EXIT
  Deactivates a HostDockSite (when assigned) when the form loses focus.
CM_ENTER
  Activates a HostDockSite (when assigned) when the form receives focus.
LM_WINDOWPOSCHANGING
  Suppresses move or resize window messages as needed for the Position or BorderStyle properties.
LM_DRAWITEM
  Handles owner-drawn Menu items for the item and command in the message.

WndProc calls the inherited method to handle control-specific messages not handled in the method.

Implements the storage specifier for the Visible property.

Returns the value in the Visible property.

True when the Visible property is set to True.
Sets the value for the AutoSize property.

SetAutoSize is an overridden method in TCustomForm used to set the value for the AutoSize property.

When set to True, it updates FormState to exclude the value fsDisableAutoSize, and modifies Position to use poDefault when it contains poDefaultPosOnly.

TControl.AutoSize
New value for the property.
Sets the value for the AutoScroll property.

SetAutoScroll is an overridden method in TCustomForm used to set the value for the AutoScroll property. It calls the inherited method to apply the new property value, but includes an additional test for the BorderStyle used on the form. AutoScroll cannot be set to True when BorderStyle has a value other than bsSizeable or bsSizeToolWin.

New value for the property.
Sets the value for the Scaled property.

SetScaled is an overridden method in TCustomForm used to set the value for the Scaled property. It calls the inherited method on entry. At run-time, the AutoScale method is called when the new property value is set to True and differs from the existing property value.

New value for the property.
Adds the specified list of actions to the ActionList for the form.

Ensures that the TList instance is allocated for the internal member. Calls the IndexOf method in the list to locate the value in the List argument. If it is not found, the Add method for the list is called to append the value.

DoAddActionList is called from the Notification method when a TCustomActionList instance is added to the form (during LCL streaming).

List with actions added to the form instance.
Removes the specified list of actions from the internal list.

Calls the Remove method in the TList member to delete the TCustomActionList specified in List.

DoRemoveActionList is called from the Notification method when a TCustomActionList instance is removed from the form.

TCustomActionList
TCustomActionList instance removed in the method.
Loads resources needed for the form.
Calls InitResourceComponent to load resources for the current form instance.
Raises an EResNotFound exception if RequireDerivedFormResource is set for the application, and a resource is not found for the form.
Re-implements the auto-drag behavior for forms.

BeginAutoDrag is an overridden method in TCustomForm which re-implements the auto-drag and dock behavior for form instances. It allows form dragging only if it is docked (HostDockSite is assigned) to a site where a DockManager is not used (UseDockManager is False). It does not call the inherited method.

TControl.HostDockSite TWinControl.UseDockManager
Docks or undocks the form in the specified dock site.

DoDock is an overridden method used to dock / undock the form instance in the dock site specified in NewDockSite. When NewDockSite is unassigned (contains Nil), the form instance is undocked from the host dock site.

ARect contains the bounds for the new dock site after resizing and alignment (when needed).

When a form is docked, its BorderStyle is set to bsNone. DoDock ensures that the value in the BorderStyle property is saved or restored for the form when the value in HostDockSite is changed. If NewDockSite has been assigned, the value in BorderStyle is saved to an internal member. If NewDockSite is Nil, the value in BorderStyle is restored from the internal member.

Changes needed for the Align property must be handled in the DockManager.

DoDock calls the inherited method prior to exit.

DoDock is called from the Dock method in an ancestor class.

TControl.Dock TControl.DoDock TControl.HostDockSite
New dock site for the form instance.
Rectangle with the bounds for the new dock site after resizing and alignment.
Gets the value for the Floating properties.
TControl.Floating TControl.GetFloating
Value for the property.
Default caption displayed when the form is docked.

GetDefaultDockCaption is an overridden String function used to get the default caption displayed when the form is docked. GetDefaultDockCaption returns the value in the Caption property.

Called from the GetDockCaption method in an ancestor class. The value is passed as an argument to the OnGetDockCaption event handler.

TWinControl.GetDockCaption TWinControl.OnGetDockCaption
Default caption displayed when the form is docked.
Handles the CM_ACTIONEXECUTE control message.

Calls DoExecuteAction to execute the TBasicAction passed as an argument in Message. Sets the Result member in Message to 1 to indicate that the action was performed in the method.

Called when a CM_ACTIONEXECUTE control message dispatched in the WndProc method in TApplication is processed for the form instance.

Control message examined in the method.
Handles the CM_ACTIONUPDATE control message.
Control message examined in the method.
Asks all applicable components to execute an action.

First, the ActiveControl and the Form itself are asked to execute the action. Then, all child components are tried. The search stops as soon as the action is handled.

True when the action was handled.
Action to execute.
Tries all applicable components to update an action.
DoExecuteAction
True when the action was updated.
Asks all components on the form to update their actions.

UpdateActions is a procedure used to update actions assigned to components on the form instance. No actions are performed in the method at design-time, or when the Showing property is set to False in the form instance.

UpdateActions applies updates for an assigned Menu in the form instance. Items on the Menu update their actions when the menu item is visible. Finally, all controls on the form instance are recursively searched; controls which are action clients update their actions when they are visible.

Update actions is called for each of the custom forms when the application enters an idle state, and occurs after processing queued asynchronous calls and the OnIdle event handler in the application.

TWinControl.Showing TControl.InitiateAction
The Handle of the MDIForm client (container for MDI children).
Constructor for the class instance.

Create is the overridden constructor for the class instance. Create sets the default values for internal members used in the form instance, and calls the CreateNew method to configure the visible aspects of the form instance. At run-time, it also calls ProcessResource to load the form content from its resource file.

Owner for the class instance.
Creates a form instance without a resource (.lfm) file.

CreateNew is an alternate constructor for the class instance. CreateNew is used to create a new TCustomForm instance which is not loaded from a resource file (.lfm). It performs actions to initialize properties for the form instance, including:

- Sets the FormState to fsFirstShow and calls BeginFormUpdate.
- Sets the default BorderIcons for the form.
- Sets the FormStyle, ControlsStyle, and BorderStyle for the form.
- Calls the inherited Create constructor.
- Sets the default bounds for the form instance.
- Sets Visible to False.
- Sets WindowState to wsNormal.
- Allocates resources for the Icon property but does not assign a bitmap.
- Sets the default value for Color.
- Calls Screen.AddForm to register the form instance on the current screen.

Owner for the new class instance.
Ignored in the current implementation.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance.

Destroy ensures that unhandled queued asynchronous calls in the Application instance are removed for the form.

Destroy disables auto-sizing to prevent resize messages while the form is being freed. Destroy frees resources allocated for the form instance, including its Icon and any allocated icon handles. The form instance is removed from Screen, and its ActionLists are freed. Destroy frees all form handlers added to the class instance.

Destroy calls the inherited destructor prior to exiting from the method.

Performs actions when the form has been created and loaded from its resource file.

Implements the virtual method defined in the ancestor class.

Called after the form instance has been created and loaded from its resource file (when needed).

Ensures that the initial bounds for the form are set to the values in the Left, Top, Bottom, and Right properties. Calls DoCreate to signal the OnCreate event handler (when assigned). Ends the form update started in the CreateNew constructor. Ensures that scaling and automatic layout are applied to form instance (if needed) when Scaled is enabled for both the form instance and the Application.

TObject.AfterConstruction
Performs actions before the form instance is physically freed.

Calls the inherited method on entry to signal any OnBeforeDestruction event handlers assigned to the form instance.

Removes the form instance from the list of focused forms in the Screen singleton. At run-time, the Hide method is called when the form is not a MDI child form in the application. If the form is a MDI child form, merged menu items are removed from the menu in the MainForm for the Application.

TControl.BeforeDestruction
Handle for the large icon used on the form.
Closes the form.

Close does not necessarily destroy the form. Modal forms only are hidden. When the MainForm is closed, the application terminates.

An OnCloseQuery handler can refuse to allow the form to close.

Asks the OnCloseQuery handler whether the form can be closed.
Updates ActiveControl if it is to be de-focused.
The control which will lose focus.
True if the control is no longer the ActiveControl.
Ensures that the form is fully visible, and optionally brings it in front of all other forms.
Bring the form to front if True.
Gives focus to the specified control.

FocusControl is a procedure used to give focus to the control specified in WinControl. FocusControl ensures that the ActiveControl property is updated when needed, and may raise an exception if WinControl cannot be focused. If the form instance was not already Active, the SetFocus method is called.

If the control or one of its parents is not visible or disabled, an exception will be raised (in SetFocus).
The control receiving the focus.
Indicates if the BeginFormUpdate method has been called without a corresponding EndFormUpdate method call.

The method is used in TControl descendants to determine if the parent form for the control is already rendering changes to its content.

TControl.FormIsUpdating
Returns True when the internal update counter for the form contains a positive non-zero value.
Makes a Bitmap image with the Form content.

GetFormImage is a TBitmap function used to get a bitmap image with the contents for the form instance. The return value must be managed by the caller to ensure that the image is freed.

GetFormImage sets the size for the TBitmap instance to the values in the ClientWidth and ClientHeight properties. The GetWindowRect routine in lclintf is called to get the display rectangle for the form Handle. The PaintTo method is called to draw the rectangle to the Canvas in the bitmap.

The return value can be Nil if an Exception was raised and handled in the method.

Bitmap created in the method with the image for the form.
The role(s) for the control in a modal form (default or cancel button).
Gets the form that is the effective parent for the pop-up, dialog, or splash screen.
Form instance that is the parent for the pop-up form, or Nil for a splash screen.
Invokes the OnDropFiles handler of the form. This function is called by the LCL interface.

The drop files event will be invoked when the user drops one or more dragged files onto one of forms in the application. First this event should be fired for the target form (or main form if drop target is unknown), and then for the application instance.

Show help for control or menu item. This function is called by the LCL interface.
TControl.ShowHelp
Determines whether the specified message contains a shortcut or accelerator key.

Checks form components to determine whether the specified message is a shortcut or accelerator key used on the form. This includes signalling the OnShortcut event handler (when assigned), calling IsShortCut for the form Menu, or calling IsShortcut for the ActionLists for the form instance.

Returns True when the specified Message is an active as a shortcut.

True when the specified Key was handled as a shortcut.
Control message examined in the method.
Resizes the form for the specified monitor.

MakeFullyVisible is a method used to make the form instance fully visible on the specified monitor. This prevents the form from being partially visible on multiple monitors.

AMonitor is the TMonitor instance where the form is displayed. If AMonitor is not specified (contains Nil), the value in the Monitor property is used.

UseWorkarea indicates whether the work area for the target monitor is used. When set to True, the form uses the bounds established for the work area instead of the physical monitor. The default value for the parameter is False.

MakeFullyVisible ensures the form fits within the required bounds for the monitor or work area. If the form is too wide or too tall, the form bounds are adjusted so that the form fits within the required bounds.

The monitor where the form is displayed, or Nil to use the design-time monitor.
When True the form is adjusted to the bounds for the WorkArea for the monitor. Otherwise, the form is clipped to the monitor bounds.
Returns True if an auto-size action should be skipped when a form handle is not available.

AutoSizeDelayedHandle is an overridden Boolean function used to determine if an AutoSize action must be deferred due to a missing form Handle.

When either Parent or ParentWindow has been assigned, the form is treated like a TWinControl; the return value is set to the value from the inherited method.

If one of the values is unassigned, the return value is always set to False. The form has its own handle, and the resize action does not need to be delayed.

Called from the AutoSizeDelayed method in an ancestor class.

True if an auto-size action should be skipped when a form handle is not available.
Marks the form for destruction.

Release is a procedure used to request destruction of the current form instance.

Release checks for a TApplication instance in the Application singleton. When it is assigned (contains a value other than Nil), its ReleaseComponent method is called to free the form instance by posting an asynchronous application message. When Application is not assigned, the Free method is called to destroy the form instance.

True when the form can receive focus.

CanFocus is an overridden Boolean function which indicates if the form instance can receive focus. The return value is True when the form is Visible and Enabled, or the inherited CanFocus method returns True.

CanFocus is used in the implementation of various methods in the class, including: SetWindowFocus, UpdateShowing, SetActiveControl, and Loaded.

True when the form can receive focus in the application.
Handles a focus change for a control (enter/exit messages).
False when the focused control cannot be changed.
The control with focus on the form.
Sets the bounds for the restored control.

Ensures that the parameter values are used in the form instance. No actions are performed in the method when ALeft, ATop, AWidth, and AHeight are already assigned to the corresponding properties in the form instance.

Temporarily sets WindowState to wsNormal, and calls SetBounds to apply the parameter values to the form instance. Calls MoveToDefaultPosition when ADefaultPosition is True. Restores WindowState to its original value, and updates the values for the RestoredLeft, RestoredRight, RestoredWidth, and RestoredHeight properties.

Called from the AfterConstruction method prior to signalling the OnCreate event handler and applying the automatic layout policy for the form instance.

Value to restore to the Left property for the form.
Value to restore to the Top property for the form.
Value to restore to the Width property for the form.
Value to restore to the Height property for the form.
True if the form is moved to the monitor and location in the Position property.
Displays the form instance with support for High DPI scaling.

Show is a method used to display the form in an LCL application. It re-implements the method defined in an ancestor class, and does not call the inherited method.

Show ensures that scaling is performed using the automatic layout policy for the form instance. The PixelsPerInch setting for the Monitor is applied (when needed) by calling the AutoAdjustLayout method. This action is performed when both the Application and the form instance have their Scaled properties set to True.

Show sets the value in the Visible property to True, and calls the ShowWindow routine in the LCL interface at run-time using the Handle and WindowState for the form. The BringToFront method is called to apply the Z-Order for the form instance and its siblings.

TControl.Show
Displays the form as a modal Dialog.

Shows the form in a modal state and waits until it is closed by the user or by the program. Modal state means that neither the user nor the program can switch to another form already made visible before calling ShowModal.

The form must have Visible set to False when calling ShowModal. The call does not return until the form is closed. The application switches to modal state until ShowModal has completed.

ShowModal creates its own event loop using ProcessMessages.

Raises an EInvalidOperation exception if the form cannot be displayed as a modal form.

The modal result for the dialog.
Displays the form in front of all other forms.

Makes the form Visible and moves it to the top of the Z-Order. WindowState is changed to wsNormal if the form is currently in a minimized state (wsMinimized). Sets the value in Visible to True, and calls BringToFront to move the form to the top of the Z-Order among its siblings.

Returns (and optionally creates) the Handle for the small Icon used for the form.
Handle for the small Icon for the form.
Executes the specified callback for all child Controls, and Components with no Parent.

GetChildren is an overridden method in TCustomForm which executes the callback method specified in Proc for child Controls owned by Root, or Components which do not have a Parent. It calls the inherited method in TWinControl to execute the callback for Child controls owned by Root. GetChildren iterates over the values in Component, and calls Proc when the HasParent method for a given component returns False.

TWinControl.GetChildren
The callback method.
Components are enumerated only if Root is Self.
Indicates if key messages in a child control are handled in the message processing loop for the form.

Always returns False in TCustomForm.

Returns False in TCustomForm.
Control with the key message for the method.
Key message from the child control.
Adds a handler for the first Show of the form.

Used in TAnchorDockHostSite.CreateNew.

Removes a handler for the first Show of the form.

Not used in the current LCL version.

Adds a handler for form Close.
Removes a handler for form Close.
Adds a handler for form Create.
Removes a handler for form Create.
Returns the currently active MDI child form.
A non-Nil result is returned only when FormStyle contains fsMDIForm or fsMDIChild; otherwise Result is nil.
Nil if the form is neither an MDI host nor child.
Nil if caller isn't an MDI type or handle isn't allocated.
-1 if caller isn't an MDI form or handle is not allocated.
Sets scaled to True and calls AutoAdjustLayout with the current PPI for the monitor.

AutoScale is a method used to apply an automatic layout adjustment policy to scale the form and its controls when enabled and needed.

AutoScale sets the value in the Scaled property to True if it is not already enabled. This causes AutoScale to be called again, so no additional actions are performed in the current method call.

AutoScale uses the value in the PixelsPerInch property for the Monitor where the form is displayed to determine if the form and its controls need to be scaled. When Scaled is enabled for the Application, and the run-time PixelsPerInch setting differs from the design-time value, the AutoAdjustLayout method is called. The lapAutoAdjustForDPI policy is applied in the method using scaling factors for the Width and Height values on the form and its Controls.

AutoScale is called when a new value is assigned to the Scaled property.

Docks the form to the specified dock site.

Calls the inherited method using the values in NewDockSite and ARect as arguments.

TControl.Dock
Gets the combined Caption for DockClients on the form.

UpdateDockCaption is an overridden method used to get the combined Caption for all DockClients on the form. It does not call the inherited method.

Exclude contains a control which is omitted from the Caption values (when assigned). UpdateDockCaption iterates over the controls in DockClients to build the combined Caption for visible controls (other than the control in Exclude). Blank control captions are ignored. UTF8FixBroken is called to ensure that a given caption does not contain invalid UTF-8 characters. The caption for a TMemo control is truncated after 20 characters.

The Caption values for the controls are concatenated into a comma-delimited list of values which are assigned to the Caption property. An empty string is never assigned to the Caption property.

UpdateDockCaption is called when a new value is assigned to the Text property for a DockClient control with an assigned HostDockSite.

TWinControl.UpdateDockCaption
Control to omit from the combined caption value.
Indicates if the form is enabled, visible, and has focus.

Active is a read-only Boolean property which indicates if the form is enabled, visible, and has focus.

The SetActive method is used to update the value for the property, locate an ActiveControl for the form, and give focus to the form control. SetActive is called from the WMActivate method when the LM_ACTIVATE window control message is handled for the form.

The value in Active is used in the FocusControl method. It causes SetFocus to be called when its value is False. It is also used in the SetActiveControl method to determine if the window already has focus when the active control is changed.

Specifies the active control on the form.

ActiveControl is a TWinControl property which contains the control which has focus on the form. The property value can be Nil if the form is hidden, disabled, or has never been activated.

Setting a new value for the property causes validity checks to be performed to ensure that the specified control can receive focus when the form is Visible. An EInvalidOperation exception is raised when the new property value contains:

- The current form instance.
- A control not parented by the current form instance.
- A control that returns False from its CanFocus method.

The SetWindowFocus method is called if the form is Active, and the ActiveChanged method is called.

The value in ActiveControl is updated in the FocusControl and DefocusControl methods.

Specifies the active default control on the form.

The active control which is the default control executed when the Enter key is pressed. When setting a new value for the property, a previous default control is notified of the change to the property value using the ActiveDefaultControlChanged method.

Specifies whether files can be dropped onto this form.

AllowDropFiles is a Boolean property which indicates whether this form receives an OnDropFiles event when files are dropped on the form during a drag-and-drop operation.

Allows the form to be drawn with translucency.

AlphaBlend is a Boolean property which indicates if the form can be drawn with translucency. When set to True, the form is drawn with a degree of transparency and diffusion. This allows other forms (and their controls) which have a lower Z-Order value to be seen beneath the form. The default value for the property is False.

Use AlphaBlendValue to specify the degree of transparency and diffusion applied to the form content.

Changing the value in AlphaBlend causes the widgetset class to be notified of the change at run-time when a handle has been allocated for the form instance. A change to the property value is not rendered at design-time.

AlphaBlend and AlphaBlendValue are used in the implementation of the InitializeWnd method, and passed as arguments to methods in the widgetset class when either of the values are changed.

AlphaBlend requires support from both the Desktop Environment (DE) and the hardware for the system; it may not work on all hardware, or platform / operating system combinations supported as Lazarus targets.
The translucence level for the form (0=transparent, 255=opaque).

AlphaBlendValue is a Byte property which indicates the level of translucency for the form when AlphaBlend is set to True. AlphaBlendValue must be in the range 0..255 (for the Byte data type), where 0 represents 100% transparency and 255 is for full opacity.

Changing the value for the property causes the widgetset class to be notified of the change in the property value at run-time when a handle has been allocated for the form.

Set AlphaBlend to True to enable translucency for the form.

AlphaBlend and AlphaBlendValue are used in the implementation of the InitializeWnd method, and passed as arguments to methods in the widgetset class when either of the values are changed.

AlphaBlend and AlphaBlendValue require support from both the Desktop Environment (DE) and the hardware for the system; it may not work on all hardware, or platform / operating system combinations supported as Lazarus targets.
Indicates if the form can automatically show or hide scroll bars.

AutoScroll is a Boolean property which indicates if the form can automatically show or hide its scroll bars. Set AutoScroll to True to enable scroll bars when the form size is too small to display its content in its entirety. AutoScroll can only be True when the BorderStyle for the form is bsSizeable or bsSizeToolWin, and may be changed to False at run-time when BorderStyle is changed to another value.

Specifies the icons which appear in the title bar for the form.

BorderIcons is a TBorderIcons property which contains valued from the TBorderIcon enumeration, and indicates the icons displayed in the title bar for the form instance. The default value for the property includes the following enumeration values:

- biSystemMenu
- biMinimize
- biMaximize

See TBorderIcon for more information about the enumeration values and their usage.

Changing the value in BorderIcons causes the WidgetSetClass for the form instance to be notified of the new values in the property.

Values in BorderIcons may be automatically changed at run-time when a new value is assigned to the BorderStyle property; see DefaultBorderIcons for the icons used for a specific border style.

The border style affects the title bar, border and resize behavior of the form.

Use BorderStyle to get or set the appearance of the form's border.

By default it is a sizeable window, but it could, for example, be a dialog form or a tool window, or could be non-sizeable.

This property is slightly different (has a different base type) from the TCustomControl.BorderStyle property. When the form is put into another control the window borders depend on the widgetset. There are no borders under GTK.

TFormBorderStyle TBorderStyle TCustomControl.BorderStyle
The control associated with the Cancel action.

Determines the control associated with the Cancel action (which exits from the modal form without changing anything). This is usually a button with the caption 'Cancel', but might be an 'Exit' button or anything else the application programmer decides. This control is selected either by explicitly clicking with the mouse, or by hitting the 'Esc' key.

The text displayed in the title bar for the form.

Setting the value in Caption also causes the caption in HostDockSite to be updated.

TControl.Caption TControl.HostDockSite
The background color for the form.
Color
is a TColor property with the background color used for the form. Color is re-declared in TCustomForm to use either clDefault or clBtnFace as the default value for the property. clDefault is used when the UseCLDefault compiler define exists, and indicates that the color is resolved to the value in a Parent control (when assigned).
TControl.Color TControl.GetDefaultColor
The control associated with the default action for this form.

This is typically a button such as 'Ok' or 'Accept' which is highlighted in some way on-screen to indicate that this is the default action. It is selected either by hitting 'Return' or 'Enter', or by clicking the control with the mouse.

The monitor on which the form is displayed.

Possible values:

dmDesktop
  No attempt to choose specific monitor.
dmPrimary
  On the primary monitor.
dmMainForm
  On the same monitor as the main form. If there is no main form then use dmPrimary behavior.
dmActiveForm
  On the same monitor as the currently active form. If there is no active form use dmMainForm behavior.

The designer object when the form is in design mode.
Value from ShowInTaskBar adjusted for the default taskbar behavior in the application.
State flags for the form.

FormState is a read-only TFormState property which contains state flags enabled for the form instance. Values from the TFormStateType enumeration are included in, or excluded from, the set type when corresponding actions occur (or are resolved) for the form instance.

See TFormStateType for more information on the values and meanings in the enumeration.

FormState is updated when properties for the form instance are changed, and in methods which respond to window and control messages in the form instance.

Indicates the style for the form.

Possible values:

fsNormal
  Usual style.
fsStayOnTop
  Form is positioned above all application's forms, except those which have fsStayOnTop style.
fsSystemStayOnTop
  Form is positioned above all OS windows, except other OS top-level windows.
fsSplash
  Form is border-less.
fsMDIForm
  MDI parent form.
fsMDIChild
  MDI child form.

TFormStyle
The name of the help file for the form.

HelpFile is a String property which contains the name of the help file for the form instance. HelpFile can use a fully-qualified path to the help file if it is not located in the same directory as the application which implements the form.

The value in HelpFile is used in TApplication when it retrieves the help file name from the active form in the application.

The Icon associated with this Form (in minimized state).

Icon is a TIcon property which contains the graphical icon for the form instance. Icon contains the image displayed on the task bar area when a form is minimized. If an Icon is not explicitly assigned for the form, the icon for the Application is used.

Assigning a new value to Icon causes existing icon handles to be freed, and the widgetset class is notified to re-create the icon handles.

TIcon
Allows the form to intercept keystrokes in child controls.

KeyPreview is a Boolean property which controls whether the form can intercept key strokes from child controls.

When KeyPreview is set to True, the form is allowed to receive KeyDown, KeyUp, and KeyPress events before they are received / applied to the ActiveControl in the form. The default value for the property is False.

KeyPreview is used in the implementation of key handling methods in TWinControl. KeyPreview is often enabled for modal dialogs to allow the parent form to handle specific interactions with the user.

Provides indexed access to MDI child forms, when this is a MDI form.

MDIChildren is a read-only indexed TCustomForm property which provides access to the child forms in a Multi-Document Interface (MDI) application. In an MDI application, one of the forms acts as the main form for the application, and is the container for its MDI child forms. In addition, an MDI child form can be nested in another MDI child form.

Historically, support for MDI is dependent on the underlying widgetset or platform. Some widgetsets provide better support for MDI than others. The consensus is that the QT/QT5 widgetsets offers the best level of support for MDI applications.

The form role is determined by the value in the FormStyle property. fsMDIForm is used for the main form, and fsMDIChild for the child forms. MDIChildren is relevant when the current form instance uses one of these MDI form style values.

Index is an Integer value is used to access a MDI child form by its ordinal position in MDIChildren. The return value contains the TCustomForm instance at the specified position, as determined using the GetMDIChildren method in the widgetset class. The return value can be Nil when the current form does not use a FormStyle with the value fsMDIForm or fsMDIChild, or when a handle has not yet been allocated for the form instance. The return value is always Nil at design-time.

Use MDIChildCount to get the number MDI child forms for the form instance.

Use ActiveMDIChild to get the active MDI child form in the application.

Set the value in the FormStyle property to indicate that the class is used as a MDI form.

Ordinal position for the MDI Child form requested.
The main menu for the form instance.

Menu is the TMainMenu instance assigned to the form.

Assigning a new value to Menu causes other forms on the Screen to be checked for a duplicate menu assignment. A singular TMainMenu instance cannot be assigned to more than one form. An EInvalidOperation is raised if another form already uses the menu instance. The UpdateMenu method is called when the new property value has been set.

TMainMenu
Specifies the return value for a form (or dialog) displayed modally.

ModalResult is a TModalResult property which contains the value derived when the form is displayed modally. Setting a new value for the property causes the widgetset class to be notified when a handle has been allocated for the form.

The value in ModalResult is updated when the ShowModal method is called for the form instance. It may is updated in the CloseModal method when CloseQuery is False and CloseAction is caNone. Finally, it is set to mrCancel in the Close method when FormState contains the value fsModal.

See TModalResult for more information about the enumeration values and their meanings.

The Monitor where the form is shown.

Monitor is a read-only TMonitor property which contains the monitor where the form was displayed. Monitor defaults to the TMonitor instance for the Parent form when it has been assigned.

When the parent form has not been assigned, and a handle exists for the form instance, the widgetset class is notified of the current coordinates for the form. The MonitorFromWindow method in the Screen singleton is called to locate the window closest to the the form (using its handle).

When neither a parent form nor a window handle are available, the MonitorFromPoint method in the Screen singleton is used to locate the form located at the Top and Left coordinates for the form instance.

Tracks changes in the focus for the active form or the last active control for the current form.

LastActiveControl is a read-only TWinControl property used to track a change in the focus for the active form or the control on the current form instance. It is updated when changes are made to the ActiveControl property, or in the SetFocusedControl method.

Defines where popup menus are shown.

PopupMode is a TPopupMode property which controls the display policy for pop-up forms. The default value for the property is pmNone. See TPopupMode for more information about the values and meanings in the enumeration.

Changing the value in PopupMode causes the value in PopupParent to be changed when the property is set to pmAuto or pmNone. At run-time, the widgetset class is notified of the change to the PopupParent property.

PopupMode is used in the implementation of the GetRealPopupParent and ShowModal methods.

Parent form which owns the current form instance when displayed as a pop-up window.

PopupParent is a TCustomForm property which contains the parent form which owns the current form instance when displayed as a pop-up window.

Setting a new value for the property causes the existing pop-up parent form to be removed from the free notifications for the application. A new non-Nil pop-up parent is added to the free notification list, and its PopupMode property is set to pmExplicit.

At run-time, the widgetset class is notified of the change in the PopupParent property. The notification is not performed at design-time.

Handler called when the form receives focus.

This handler is called when the form receives focus for the first time at application start up, and then subsequently each time focus is changed from another window for the same application to this window.

For focus changes between different applications, the Application.OnActivate event handler is called instead.

TApplication.OnActivate
Handler called when the form is closed. It determines what happens to the form (destroy, hide...).

OnClose is a TCloseEvent property which represents the event handler signalled when a form calls its Close or CloseModal method.

OnClose is triggered from the DoClose method immediately before calling any internal form handlers registered for the fhtClose form handler action type. OnClose can be used to determine the action performed in subsequent form handlers by setting the value in the CloseAction argument.

An application must implement and assign an object procedure using the signature for TCloseEvent to respond to the event notification.

Event handler signalled when trying to close a form.

OnCloseQuery is a TCloseQueryEvent property which contains the event handler signalled to determine whether the form can be closed. Set the value in the CanClose argument to True to allow the form instance to be closed. The default value for CanClose is True.

Use OnCloseQuery to perform any actions or dialogs needed to confirm that the form can in fact be closed.

An application must implement and assign an object procedure using the signature in TCloseQueryEvent to respond to the event notification.

OnCloseQuery is signalled from the CloseQuery method, and occurs immediately after MDI child forms have called their CloseQuery methods.

Handler called when the form has been created.

OnCreate is a TNotifyEvent property which implements an event handler signalled when a new form instance is created. OnCreate can be used to perform any action needed to configure the new form instance, or update the application where the form is used.

OnCreate is triggered from the DoCreate method (when assigned) before signalling any form handlers using the fhtCreate form handler action type. At this point, the initial coordinates for the form have been assigned, but are not realized until until DoCreate has been completed.

An application must implement and assign an object procedure using the signature for the handler to allow responding to the notification.

TNotifyEvent
Handler called when the form is deactivated (loses focus).
OnDeactivate is a TNotifyEvent property which contains an event handler signalled when form is deactivated (loses focus). OnDeactivate is signalled from the Deactivate method (when assigned).
Handler called when the form is destroyed.

OnDestroy is a TNotifyEvent property signalled when the form instance is destroyed. OnDestroy is signalled from the DoDestroy method (when assigned) as one of the steps before destruction of the class instance. Before the event handler is triggered, the form has been hidden and the Menu from the main form in the Application has been unmerged.

Handler called when files have been dropped.

OnDropFiles is a TDropFilesEvent event handler signalled when a File Drag notification is received from the LCL / widgetset interface.

The Sender argument contains the current form instance. The FileName argument contains an array with the file names for the drop operation.

Set AllowDropFiles to True to enable drag and drop operations, and execution of this event handler.

Handler called when Help is requested.

OnHelp is a THelpEvent property which contains the event handler signalled when a Help command is executed for the form instance. Arguments to the event handler identify the command and the context used in the help request.

Command contains the help request type, and corresponds to the values used in the Windows WinHelp API.

Data is a PtrInt type which points the context information for the help request.

The CallHelp argument indicates if handler(s) in the Application instance should be called when the event handler in the form is completed. Set CallHelp to False when the help request has been satisfied in the event handler.

An application must implement and assign an object function using the signature for the handler to respond to the event notification.

Set the return value to True if the Help request was successfully executed.

The OnHelp event handler for the active form is signalled when the TApplication instance executes its DoOnHelp method. The arguments to the event handler contain the values intercepted in the WMHelp message processing for the application. If the OnHelp event handler has not been assigned for the active form, the OnHelp event handler in the Application singleton is signalled (when assigned).

Handler called when the form is being hidden.

OnHide is a TNotifyEvent property that represents the event handler signalled when the form instance is hidden. OnHide is triggered (when assigned) in the DoHide method, and occurs when the CMShowingChanged control message is applied to the Showing property for the form instance.

TWinControl.Showing TNotifyEvent
Event handler signalled when the size for the form is changed.

OnResize is a TNotifyEvent property with the event handler signalled when the dimensions for the form have been changed. It is signalled (when assigned) from the DoOnResize method, and occurs in the inherited DoOnResize method in the ancestor class.

Create and assign a procedure to the event handler to perform any actions needed after the form has been resized.

Use the OnConstrainedResize event handler to set the height and/or width for the form using minimum and maximum height and width values.

TControl.OnResize
Event handler signalled when a key is pressed, before further handling of the key.

OnShortcut is a TShortcutEvent property that represents the event handler signalled (when assigned) to detect and handle a shortcut key for the form instance. OnShortcut is called from the IsShortcut method used to examine keystroke events intercepted and forwarded by the Application.

The Msg argument contains the key event examined in the handler. Handled indicates that the key is handled by the event when set to True.

Handler called when the form becomes visible.

OnShow is a TNotifyEvent property with the event handler signalled (when assigned) when the form becomes visible. It is signalled from the DoShow method when the CM_SHOWINGCHANGED control messages is handled for the form, and when queued OnResize and OnChangeBounds events are executed for the form.

Create and assign a procedure to OnShow to perform any actions needed when the Visible property for the form is set to True.

Event handler signalled when modal display of the form has been completed.

OnShowModalFinished is a TModalDialogFinished property that implements the event handler signalled when modal display of the form has been completed. An application must implement an object procedure using the signature in TModalDialogFinished, and assign it to the property to respond to the event notification.

Is this still needed? Not used in ShowModal or CloseModal. It does not appear to be signalled anywhere in the current LCL version.

Handler called when the form is minimized, maximized or restored.

OnWindowStateChange is a TNotifyEvent property which represents the event handler signalled when the value for the WindowState property is changed. OnWindowStateChange is triggered (when assigned) from the Resizing method, and occurs when the WM_SIZE window message for the action is handled.

See TWindowState for details about the values and meanings in the enumeration.

Uses the font from the Parent when enabled.

If true, the Font will be the same as the one from the Parent. The default value for the property is False in TCustomForm.

While ParentFont is True, all changes to the font in the parent will also be applied to the font for the control. This synchronizes them, keeping them set to the same values. If changes are made directly to the Font property in the control, then ParentFont is automatically be set to False.

TControl.ParentFont
The initial placement for the form.

Position is a TPosition property which indicates the size and position policy used to display the form instance. The default value for the property is poDesigned, and indicates that the coordinates used in the form designer are used at run-time. See TPosition for the other values, and their meanings, available for the property.

Changing the value in Position causes the value in AutoSize to be updated when needed, and calls UpdateControlState. No additional actions are performed at design-time.

MoveToDefaultPosition is called when a handle exists for the form instance and the form has not been displayed.

The Left coordinate for the form when it is restored (i.e. changes from minimized or maximized).

RestoredLeft is a read-only Integer property which contains the left coordinate for the form when its size is altered in WMSize or WMMove message handlers. The property value is applied when the asynchronous queued event handler for the form is executed, and calls the DoOnChangeBounds method.

TControl.DoOnChangeBounds TControl.Left
The Top coordinate for the form when it is restored (i.e. changes from minimized or maximized).

RestoredTop is a read-only Integer property which contains the top coordinate for the form when its size is altered in WMSize or WMMove message handlers. The property value is applied when the asynchronous queued event handler for the form is executed, and calls the DoOnChangeBounds method.

TControl.DoOnChangeBounds TControl.Left
The width of the form when it is resized.

RestoredWidth is a read-only Integer property which contains the Width for the form when its size is altered in WMSize or WMMove message handlers. The property value is applied when the asynchronous queued event handler for the form is executed and calls the DoOnChangeBounds method.

TControl.DoOnChangeBounds TControl.Width
The height of the form when it is resized.

RestoredHeight is a read-only Integer property which contains the height for the form when size is altered in WMSize or WMMove message handlers. The property value is applied when the asynchronous queued event handler for the form is executed and calls the DoOnChangeBounds method.

TControl.Height TControl.DoOnChangeBounds
How the form is represented in the system Task Bar.

ShowInTaskBar is a TShowInTaskbar property which indicates how the form is represented on the system task bar. The default value for the property is stDefault, and indicates the default behavior for the widgetset, platform, or operating system is used. See TShowInTaskbar for more information about values in the enumeration and their meanings.

ShowInTaskBar is used in conjunction with the TaskBarBehavior property in the Application singleton to determine the effective visibility for the form on the system task bar. For example: The task bar behavior may require grouping related forms under a single form icon.

Changing the value for the property causes the effective visibility to be recalculated when the form is not hidden, or a MDI child form. The new effective task bar visibility is posted to the widgetset class.

Indicates if the control is visible on its parent.

Re-declared in TCustomForm to use a different storage specifier than the ancestor class. In TCustomForm, visibility is not tied to an Action or an ActionLink; it uses the value in the Visible property.

TControl.Visible
Indicates whether the form is displayed in a minimized, maximized, full-screen or normal state.

WindowState is a TWindowState property which indicates whether the form is currently displayed minimized, maximized, full-screen or normal (restored) state. The default value is wsNormal (i. e. neither minimized nor maximized).

Changing the value for the property at run-time causes the ShowWindow routine to be called with the Integer display command representing the new property value. The action is not performed at design-time, or when Showing is set to False.

TWinControl.Showing ShowWindow
Class reference for the TCustomForm class.

Used primarily in the implementation of window classes for the Lazarus IDE.

Implements a form used in an LCL application.

TForm is a TCustomForm descendant which implements a form displayed in an LCL application. It sets the visibility and default values for properties introduced in ancestor classes. It also adds methods needed for use as an MDI form in an application. LCL version information is available in the LCLVersion property, and is streamed to to the component resource file when a Parent is not assigned for the form.

Forms created at design-time using the Lazarus IDE are TForm descendants. A form can be used as the main form in an application, or it can be displayed as a MDI forms, dialog box, or tool window. Controls can added to the form, such as: TEdit, TLabel, TButton, TCheckBox, TComboBox, TListView, TTreeView, et. al.

Creates an assocation between the class type and its widgetset class.
WSRegisterClass is an overridden class procedure used to register the widgetset class used to create new instances of the form.
TCustomForm.WSRegisterClass
Creates the handle for the widgetset class and updates it menu and icons.

CreateWnd is an overridden method in TForm. It makes the form instance the main form in the Application singleton if not already assigned and the form is not a MDI Child or a splash form.

CreateWnd calls the inherited method to create (or re-create) the Handle for the widgetset class, set the form state and auto-sizing behavior, and update its Menu and Icons.

Performs actions when LCL component streaming has been completed for the form instance.

Loaded is an overridden method in TForm, and calls the inherited method on entry. It ensures that the value in the LCLVersion property is set to the lcl_version constant from the LCLVersion unit.

Constructor for the class instance.

Create is an overridden constructor for the class instance. Create ensures that the LCLVersion property is updated with the value from the lcl_version constant in the LCLVersion unit. Create calls the inherited constructor prior to exiting from the method.

lcl_version
Owner of the form instance.
Arranges MDI child forms so they overlap.

Cascade is a method used to arrange MDI Chid forms so that they overlap in a cascading fashion.

No actions are performed in the method when FormStyle has a value other than fsMDIForm. At run-time, the Cascade method in the widgetset class is called when its Handle has been allocated.

Use Tile to arrange MDI child forms in a grid format.

Activates the next child MDI form (fsMDIChild) in the form sequence.
Activates the previous MDI child form in the form sequence.
Arranges MDI child forms side-by-side in a grid format.
Arranges the icons for minimized forms in a MDI form.

ArrangeIcons is a method used to arrange the icons for minimized forms on a MDI form. No actions are performed in the method at design-time, or when FormStyle is set to a value other than fsMDIForm. ArrangeIcons calls the corresponding method in the widgetset class when its Handle has been allocated.

TWinControl.Handle TWinControl.HandleAllocated
The LCL version number as a String type.

Used to distinguish form streaming content for different versions of the LCL.

Class of TForm.
A floating DockSite, usable to make TControls float.
Adds Client as a child control which fills the entire area for the docked form.

DoAddDockClient is an overridden method used to add the control in Client to the docked form. It calls the inherited method on entry to set the Parent in Client to the current class instance. It sets the Align property in Client to alAlign to align the control to the bounds for the docked form. Values in the BorderSpacing property in Client are reset to 0; the current class instance provides the BorderSpacing values for the docked control. At run-time, the Visible property is set to True to display the docked form after the Client has been added.

TWinControl.DoAddDockClient
Control added to the docked form instance.
Not used in the current implementation.
Closes (releases) the form after the last client has been undocked.
TWinControl.DoRemoveDockClient
Disallows docking of an second client.
Tries to make all child controls dockclients. This is of little use in practice, a floating hostdocksite should have no child controls.
Constructor for the class instance.

Create is the overridden constructor for the class instance. It calls CreateNew to create a new form instance, and sets the default values for:

- AutoScroll (False)
- BorderStyle (bsSizeToolWin)
- DockSite (True)
- FormStyle (fsStayOnTop)

Owner for the class instance.
Indicates if the form can automatically show or hide scroll bars.

AutoScroll is a Boolean property which indicates if the form can automatically show or hide its scroll bars. The default valule for the property is False in TCustomDockForm.

AutoScroll can only be True when the BorderStyle for the form is bsSizeable or bsSizeToolWin , and may be changed to False at run-time when BorderStyle is changed to another value.

TCustomDockForm.BorderStyle TCustomForm.AutoScroll
The border style affects the title bar, border and resize behavior of the form.

Use BorderStyle to get or set the appearance of the form's border. The default value in TCustomDockForm is bsSizeToolWin.

This property is slightly different (has a different base type) from the TCustomControl.BorderStyle property. When the form is put into another control the window borders depend on the widgetset. There are no borders under GTK.

TCustomForm.BorderStyle TFormBorderStyle
Indicates the style for the form.

The default value in TCustomDockForm is fsStayOnTop.

TCustomForm.FormStyle TFormStyle
The pop-up box containing helpful information that appears when the mouse pointer hovers over an object.

THintWindow is a TCustomForm descendant used to display text hints. It is not intended for use with child controls.

Usage:

HintWindow := THintWindow.Create(nil); Rect := HintWindow.CalcHintRect(0, 'This is the hint',nil); HintWindow.ActivateHint(Rect, 'This is the hint');
True during ActivateHint.
The timer used to make the hint disappear.
Adjusts HintRect to fit on the current monitor.

Used in the implementation of the OffsetHintRect method.

Indicates that the width for HintRect should not be decreased.
Indicates that the height for HintRect should not be decreased.
Collects the flags for Draw Text formatting.

Returns a Cardinal value that contains the Draw Text flags needed for the Alignment and BiDiMode used in the hint window.

Draw Text flags for the hint window.
Sets the value for the AutoHide property.
THintWindow.AutoHide
New value for the property.
Hides the hint window when the hint timer has expired.

Called when the hint timer expires. Ensures that the internal hint timer is disabled. Hides the hint window by setting the Visible property to False.

Not used in the method.
Sets the value for the HideInterval property.
New value for the property.
Sets the value for the HintRectAdjust property.
New value for the property.
Handles the WM_NCHITTEST window message for the hint window.

Sets the result in Message to HTTRANSPARENT. This forces the message to be forwarded to other windowed controls in the Z-Order until a value other than HTTRANSPARENT is returned.

Window message examined and updated in the method.
Sets the bounds for the hint window and configures the auto-hide timer.

Sets the bounds for the hint window to the values in the HintRect property, and makes the window Visible. The internal auto-hide timer is enabled when AutoHide contains True.

Called from the ActivateHint method.

TControl.Visible
Updates the Window Region fir the hint window.

UpdateRegion calls the SetWindowRgn routine to set the window region for the hint window. The window region contains the area where the system can perform drawing operations; no area outside of the window region can be updated.

SetWindowRgn
requires access to the Handle for the hint window; no actions are performed in the method when HandleAllocated returns False.

When UseBGThemes is enabled, ThemeServices are used to get the theme element details needed for the client rectangle in the hint window.

Sets the value for the Color property.
TControl.Color
New value for the property.
Indicates if a background from theme services is used when drawing the hint window.
True when ThemeServices are used for the background.
Indicates if theme services are used for the foreground rendered for the hint window.

The return value is True when the Font used on the hint window is the stock system font for the platform.

True when ThemeServices are used to draw the foreground for the hint window.
Draws the content in the hint window.

Paint is an overridden method in THintWindow. It extends the inherited method to implement default drawing using the Canvas and the settings enabled for theme services. When CountrolCount is 0, the internal routine is used to render the content.When CountrolCount indicates that child controls are present on the hint window, the inherited Paint method is called to render the content.

TCustomControl.Paint
System font used to draw text in the hint window.
TFont instance for the system font provided by the widgetset.
Destructor for the class instance.

Destroy is a class method used as the destructor for the class. Destroy ensures that the reference to the System Font used for hint windows is freed.

Constructor for the class instance.

Create is the overridden constructor for the class instance. Create calls the inherited CreateNew constructor, and allocates resources needed in the class instance. This includes an internal timer used when AutoHide is set to True.

Create sets the default values for the following properties:

Parent
  Set to Nil
Color
  Set to clInfoBk
Font
  Uses the Screen.HintFont
Canvas
  Uses the brush style bsClear
Alignment
  Set to taLeftJustify
BorderStyle
  Set to bsNone
Caption
  Set to an empty string ('')
HideInterval
  Set to 3000 milliseconds (3 seconds)
AutoHide
  Set to False

Create uses the default size from the class type for the control to set the initial bounds for the hint window.

Owner of the class instance.
Shows the specified hint.

ActivateHint is an overloaded procedure used to display the Hint text specified in AHint. An overloaded variant allows the display area for the hint window to be specified in the ARect argument.

No actions are performed in the method if ActivateHint has been previously called with the same hint text and display area.
Text displayed in the hint window.
TRect with the display area for the hint window.
Sets the bounds in HintRect and activates the hint window.

ActivateWithBounds is a procedure used to update the location and text for the hint window. ActivateWithBounds sets the value in HintRect to the value in the ARect argument. ActivateWithBounds calls ActivateHint using the value in AHint as the text displayed in the hint window.

Rectangle with the bounds assigned to HintRect.
Text displayed in the hint window.
An extended version of ActivateHint with additional data used for the hint display.

ActivateHintData is an extended version of ActivateHint. It provides the additional AData argument which contains a pointer to values which can be used to construct the text displayed in the hint window.

The implementation in THintWindow does not use the values in AData. The method must be overridden in a descendent class to use the additional hint data in AData.

Display rectangle for the hint text.
Text displayed in the hint window.
Pointer to additional data used to construct the hint text.
Determines the rectangle required for the hint display.

CalcHintRect determines the display rectangle required for the hint display. CalcHintRect uses the larger of the values in the length of the hint text, and the width of the hint window.

Display area needed for the hint display.
Greater than zero, otherwise the full monitor width is used.
Hint text used to derive the display area.
Pointer to additional data used to construct the hint text.
Moves the hint rectangle by the specified amounts.
True when the hint rectangle was successfully moved by the specified amounts.
TPoint with the horizontal and vertical offsets for the hint display.
Additional vertical offset applied to the hint rectangle.
Indicates the width for the hint rectangle must be maintained.
Indicates the height for the hint rectangle must be maintained.
Indicates if the specified message is relevant to a hint window display.

IsHintMsg is a Boolean function used to determine if the message instance in Msg is recognized in THintWindow.

Not used in the current LCL implementation.
TMsg
True if the message is used for hint windows, False for all other messages.
TMsg instance with the message examined in the method.
Destroys an allocated handle for the widget.

ReleaseHandle is a method used to free the Handle allocated for the control in the widgetset class. It calls the DestroyHandle method if the Handle has been allocated for the class instance. ReleaseHandle is called by methods in the widgetset class to ensure that the Handle is set 0 (the un-initialized value).

TWinControl.DestroyHandle
Applies the argument values to the bounds for the control.

SetBounds is an overridden method in THintWindow. It calls the inherited method on entry to apply the argument values to the bounds for the class instance. It calls the UpdateRegion method to set the window region, or apply a background theme when enabled.

TWinControl.InitializeWnd
Value for the Left property.
Value for the Top property.
Value for the Width property.
Value for the Height property.
Text alignment used for the hint window.

Alignment is a TAlignment property that indicates the alignment used for the text displayed in the hint window.

The default value for the property is taLeftJustify, as assigned in the Create constructor. The value in Alignment is used to derive the draw text flags required for the BidiMode in the hint display, and passed to to DrawText routine in theme services or widgetset classes.

Contains the bounds used to display the text for the hint.

HintRect is a TRect property which contains the bounds used to display the hint when it is activated. HintRect is adjusted using the values in HintRectAdjust (when assigned) and the borders drawn around the hint display.

Contains the bounds with additional space needed for the hint display.
Pointer to data used to formulate text displayed in the hint window.
Does the hint disappear (get hidden) after a while?
If AutoHide is TRUE, the hint disappears after an interval specified by HideInterval.
The time after which the displayed hint disappears.
Class of THintWindow.
For a rendered hint with a child control added by an external provider.
Constructor for the class instance.
Owner of the class instance.
Destructor for the class instance.
Shows hint contents are rendered by a provider on child control.
Provides information about a physical monitor.

Monitor information is retrieved dynamically from the Operating System. This ensures that any changes to the installed hardware devices or their configuration are taken into account. TMonitor has properties that reflect its dimensions, use as the primary monitor, and its display density (or Pixels per Inch).

TMonitor is the type returned when reading the TScreen.Monitors property. TMonitor is the type used to implement the TCustomForm.Monitor property.

Retrieves monitor information from the OS or platform.

Getinfo is a Boolean function used to get monitor information from the OS or platform hosting the LCL application. Getinfo initializes the Info output parameter to the size required for the TMonitorInfo type, and calls the GetMonitorInfo routine for the widgetset.

The return value is True when monitor information is successfully retrieved for the OS or platform. Info contains the size, display rectangle, work area, and flags for the monitor.

TMonitorInfo
True when monitor information was successfully retrieved.
TMonitorInfo with values retrieved for the OS or platform.
Gets the value for the Left property.
Value for the property.
Gets the value for the PixelsPerInch property.
Value for the property.
Handle which identifies this monitor to the system.
Index of the monitor in the list.
The leftmost screen coordinate of the display.
The height of the display.
The top-most screen coordinate of the display.
The width of the display.
The logical dimensions of the monitor, within the desktop.
The usable display area, excluding a taskbar etc.
True if this is the primary monitor of the system.
Contains the Pixels Per Inch or display density for the monitor.
A list of monitors available on the system.

TMonitorList is a TList descendant used to store TMonitor class instances representing the physical monitors attached to the system. It provides an indexed Items property that can be used to access monitor information by an ordinal position in the list. It also provides an overridden Notify method to free a TMonitor instance when the lnDeleted list notification is received.

TMonitorList is the type used to implement the Monitors property in TScreen.

TList
List notification handler which destroys the Monitor object on removal from the list.
The monitor object.
The list operation.
The indexed list of all Monitors.

Items is a TMonitor property which provides indexed access to a monitor in the list by its ordinal position. Items is the default property for the list, and the target for a list enumerator for the class instance.

TMonitor instances in Items are create and added at run-time when the UpdateMonitors method in TScreen is called. This occurs in response to a WM_DISPLAYCHANGE message in the processing loop for an application.

Ordinal position for a monitor in the list.
Contains information about a cursor shape.

TCursorRec is a record type which contains information about a cursor shape used in an application. It contains members with the index position for the cursor, the Handle for the cursor resource, and a pointer to the next cursor record in the list.

Pointer to the next cursor record in the list.
Position of the cursor record in the list..
The handle for the cursor resource.
Type used for a screen notification handler, for form related events.
TObject for the event notification.
The affected form.
Type for a screen notification handler used for control related events.
TObject for the event notification.
The new active control.
Screen notification events and handler types.
A form was added.
A form was removed.
The focus moved to another control.
The focus moved to another form.
The visibility of a form changed.
The monitor to use when screen coordinates are outside of the physical bounds for the screens.
Default to the nearest monitor.
Default to Nil (no suggested monitor).
Default to the primary monitor.
Provides information about the screen display in an application.

TScreen is a TLCLComponent descendant which provides information about multiple monitors in an LCL application. TScreen allows the GUI for an application to be managed on multiple monitors. It includes the size and resolution for a screen, and allows mapping the virtual Desktop and Workareas to the physical Monitors known to the application.

TScreen also provides access to objects displayed on a given screen, including: Forms, Cursors, and Fonts. For Delphi compatibility, non-visual DataModules are also included in the TScreen information. Properties are provided in the class with the currently active Form, Control and Cursor for a screen.

TScreen is the type used for the Screen singleton in an LCL application.

The last active control, used to detect focus changes.
The last active form, used to detect focus changes.
Removes the specified cursor from the Cursors property.
The logical cursor ID.
Deletes all TCursor instances in the Cursors property.
Clears the Monitors list.
Gets the value for the indexed Cursors property.
Value for the indexed property.
The logical cursor ID.
Gets the value for the CustomFormCount property.
Value for the property.
Gets the value for the indexed CustomForms property.
Value for the indexed property.
Ordinal position for the property value.
Gets the value for the indexed CustomFormsZOrdered property.
TCustomForm instance at the specified position in the Z-Order.
Ordinal position for the property value; smaller values are higher in the Z-Order.
Gets the value for the DataModuleCount property.
Value for the property.
Gets the value for the indexed DataModules property.
Value for the indexed property.
Ordinal position for the property value.
Gets the value for the DesktopLeft property.
Value for the property.
Gets the value for the DesktopTop property.
Value for the property.
Gets the value for the DesktopHeight property.
Value for the property.
Gets the value for the DesktopWidth property.
Value for the property.
Gets the value for the DesktopRect property.
Value for the property.
Gets the value for the Fonts property.
Value for the property.
Gets the value for the GetFormCount property.
Value for the property.
Gets the value for the indexed Forms property.
Value for the property.
Ordinal position for the form instance in the property value.
Gets the value for the Height property.

Calls GetSystemMetrics to get the value for the property.

Value for the property.
Internal notification handler, adds a new form to the lists.
Form instance added in the method.
Internal notification handler, removes the form from the lists.
Form instance removed from the list.
Stores the currently active form and control in the last active members. Notifies all registered handlers of eventual changes.
Moves the Focus back to the previously focused control.
Adds a notification handler with the specified type.
The notification (event) type.
The notification handler.
Add the handler as the first (True) or last (False) handler.
Removes a notification handler with the specified type.
The notification (event) type.
The notification handler.
Adds the specified data module to the list.
Data module instance added in the method.
Removes the specified data module from the list.
Data module removed in the method.
Notifies all registered handlers for the given event type.
Event type for the notification.
Form instance for the notification.
Gets the value for the HintFont property.

Ensures that a TFont instance exists for the member, that it has been initialized to the stock hint font for the WidgetSet class, or uses the default font and the color in clInfoText.

Value for the property.
Gets the value for the IconFont property.

Ensures that a TFont instance exists for the member, that it has been initialized to the stock icon font for the WidgetSet class, or uses the default font and the color in clDefault or clWindowText (depends on the UseCLDefault define for the platform).

Value for the property.
Gets the value for the MenuFont property.
Value for the property.
Gets the value for the SystemFont property.
Value for the property.
Constructor for the class instance.

Create is the overridden constructor for the class instance, and calls the inherited method on entry.

Create allocates resources needed for properties, including: Fonts, Monitors, CustomForms, CustomFormsZOrdered, and DataModules. Resources for internal members are also allocated.

Create gets the default value used for the PixelsPerInch property from the ScreenInfo variable in the LCL interface.

Create assigns methods in the class instance as the routines used by the Lazarus IDE to provide support for data modules. Create assigns the routine used to get system fonts for the application.

Owner of the class instance.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. Destroy ensures that screen handlers registered using AddHandler are freed. Destroy also frees resource allocated for the class instance in the Create constructor. It calls the inherited method prior to exit.

Gets the ordinal position in CustomForms for the requested form.

CustomFormIndex is an Integer function used to get the position in CustomForms for the specified TCustomForm instance. It iterates over the values in CustomForms in reverse order. The return value contains the ordinal position in CustomForms where the TCustomForm instance in AForm was found, or -1 when AForm does not exist in CustomForms.

Use the FormIndex method to locate a form instance derived from TForm in the Forms property.

The ordinal position for the form in CustomForms, or -1 when not found.
The form instance to locate in CustomForms.
Gets the ordinal position in Forms for the requested form.

FormIndex is an Integer function used to get the position in Forms where the specified TForm instance in located. It iterates over the values in Forms in reverse order. The return value contains the ordinal position in Forms where the TForm instance in AForm was found, or -1 when AForm does not exist in Forms.

Use the CustomFormIndex method to locate a form instance derived from TCustomForm in the CustomForms property.

Ordinal position in Forms for the TForm instance, or -1 when not found.
The TForm instance to locate in Forms.
Gets the position in CustomFormsZOrdered for the specified form.

The return value contains the z-order for the specified form, with the currently active form at index position zero (0).

Form instance to locate in CustomFormsZOrdered.
Moves the specified form to the front of all other forms.

MoveFormToFocusFront is a method used to move the form specified in ACustomForm to the top of the Z-order. This means that it appears on top of all other visible forms for the application.

MoveFormToFocusFront is called when the focused control is changed in the TCustomForm instance. It is also called from the ShowModal method in TCustomForm.

It ensures that ACustomForm is moved to the first position in CustomForms (the top of the Z-order). When ACustomForm is a TForm instance, it is also moved to the first position in the Forms property. Calls MoveFormToZFront to ensure that the form is moved to the first position in the CustomFormsZOrdered property.

Raises a catchable GDB exception if the form or screen classes are being destroyed, or when ACustomForm is not assigned or not present in the CustomForms property.
Form instance to move to the top of the Z-order.
Moves the form to the front of the Z-order in the CustomFormsZOrdered property.

MoveFormToZFront is a method used to ensure that the form in ACustomForm is at the top of the Z-order in the CustomFormsZOrdered property. MoveFormToZFront is called from the MoveFormToFocusFront method.

Raises a GDB exception when the form is being destroyed, or the application is shutting down.
Form instance to move to the top of the Z-order.
Returns the Modal form at the top of the Z-order for the screen.

Calls GetCurrentModalFormZIndex to find the first form instance in CustomFormsZOrdered with the value fsModal in its FormState property.

The modal form, or Nil if a modal form is not active.
Returns the index of the top-most modal form in CustomFormsZOrdered.

Visits the form instances in CustomFormsZOrdered to find the first TCustomForm instance with the value fsModal in its FormState property.

Returns -1 if a modal form is not found in the CustomFormsZOrdered property.

Called from the GetCurrentModalForm method.

The index for the form, or -1 if no modal form is active.
Checks whether the specified form is present in the Z-ordered list of forms.

The return value is True when ACustomForm is found in the CustomFormsZOrdered property and is not displayed as a modal form (FormState contains fsModal). The return value is False if ACustomForm is not found in CustomFormsZOrdered.

Used in widgetset classes to determine if a form is used and enabled on the screen.

True if the form is used on the screen.
Form instance to locate in the Z-ordered forms for the screen.
Finds the form with the specified name, excluding designer forms.

Used when an Application loads its components using the LCL streaming mechanism. Ignores the designer forms and data modules (where ComponentState contains csDesigning) handled by the Lazarus IDE.

Application form instance in CustomForms with the specified name, or Nil.
Name of the form to locate in the method.
Finds a form on the screen by its name.

Visits the form instances in the CustomForms property, and compares the text in the Name properties to the value in FormName. CompareText is called to perform a case-insensitive comparison for the values.

The return value is the TCustomForm instance which matches the name in FormName, or Nil when CustomFormCount is 0 or FormName is not found in CustomForms.

Form instance with the specified name, or Nil.
Name for the form to locate in the method.
Finds a data module with the specified name, excluding designer data modules.

Visits the data module instances in the internal list, and compares the Name property for the TDataModule instances to the value in DataModuleName. CompareText text is called to perform a case-insensitive comparison for the values. TDataModule instances with csDesigning in the ComponentState property are ignored; these are design-time data modules used by the Lazarus IDE.

The return value contains the TDataModule instance with the name in DataModuleName, or Nil when the data module list is empty or the name in DataModuleName is not found in the list.

Used when an Application loads its components using the LCL streaming mechanism. Ignores the designer forms and data modules (where ComponentState contains csDesigning) handled by the Lazarus IDE.

Data module with the specified name, or Nil.
Name of the data module to locate in the method.
Finds the data module with the specified name.

FindDataModule is a TDataModule function used to get the data module with the name specified in DataModuleName.

FindDataModule visits each of the data modules in the internal list to find the TDataModule instance with the specified name in its Name property. CompareText is called to perform a case-insensitive comparison for the values.

The return value is the TDataModule instance with the name in DataModuleName, or Nil when the internal list is empty or DataModuleName is not found in the list.

TDataModule instance with the specified name, or Nil.
Name for the data module to locate in the method.
Rebuilds the list of available monitors.

Calls DestroyMonitors to clear existing TMonitor instances in the Monitors property. Calls EnumDisplayMonitors in the LCL interface to create and store TMonitor instances in the Monitors property.

UpdateMonitors is called when the private UpdatedMonitor function needs to access information for a monitor using its Handle. It is also called when the value for the Monitor or MonitorCount property is read.

Updates the value for the PixelsPerInch property.

Updates the value for the PixelsPerInch property from the ScreenInfo in the LCL interface.

Removes all handler routines for the specified object regardless of notification type.

RemoveAllHandlersOfObject is a method used to remove all handler routines for the specified object, regardless of the TScreenNotification type. RemoveAllHandlersOfObject iterates over the method lists in the internal array, and calls the RemoveAllMethodsOfObject method for the object instance specified in AnObject. It calls the virtual inherited method prior to exit.

Called when the Lazarus IDE is terminated.

TMethodList.RemoveAllMethodsOfObject TLCLComponent.RemoveAllHandlersOfObject
Adds a form added notification handler to the class instance.
Routine added as the form added notification handler.
True when OnFormAdded should be the first entry in the list of handlers for the type.
Removes a form added notification handler.
Form added handler removed in the method.
Adds a form removed notification handler.
Form remove handler added in the method.
True if the handler should be stored as the first routine for the type.
Removes a from removed notification handler.
Form remove handler routine removed in the method.
Adds a control changed notification handler.
Active control changed notification handler added in the method.
True if the handler should be the first in the list for the type.
Removes a control changed notification handler.
Active control changed handler removed in the method.
Adds a form changed notification handler.
Active form changed handler added in the method.
True if the handler should be the first in the list for the type.
Removes a form changed notification handler.
Active form changed handler removed in the method.
Adds a visible changed notification handler.
Form visible changed handler added in the method.
True if the handler should be the first in the list for the type.
Removes a visible changed notification handler.
From visible changed handler removed in the method.
Disables all forms except for SkipForm.

Used to disable forms when a modal form or dialog is displayed.

The enabled state for forms is determined by the widgetset class, and not from LCL properties. If DisabledList is Nil, a new list is created. All forms disabled in the method are added to the list. When the modal form returns, EnableForms is called to restore the list of forms disabled in the method.

The list containing all disabled forms.
Don't disable this form (ignored if Nil).
The list to update. If Nil, a new list is created and returned.
Re-enables forms disabled in the DisableForms method.

Use this method to restore all previously disabled forms.

The list containing the forms to enable. The list is destroyed on exit.
Finds the monitor containing the given screen coordinates.

MonitorFromPoint is a TMonitor function used to get the monitor with the coordinates in the Point argument.

MonitorDefault is a TMonitorDefaultTo enumeration value which indicates which monitor to use when the coordinates in Point cannot be located on a screen. See TMonitorDefaultTo for more information about the enumeration values and their meanings.

MonitorFromPoint calls the corresponding method in the widgetset class to get the Handle for the monitor. Values in the Monitors property are checked for the Handle, and the return value is set to the TMonitor instance with the given Handle.

If the Handle is -1 (MONITOR_UNIMPL), the MonitorFromRect method is called to locate a monitor with the origin in Point. Otherwise, the values in Monitors are refreshed to ensure that existing monitors and their handles are up-to-date in the class instance.

MonitorFromPoint is called from the GetMonitor method in TCustomForm, and the AdjustBoundsForMonitor method in THintWindow.

The monitor where the coordinates are located.
The screen coordinates used to find a monitor.
Monitor returned when the coordinates are not found on a monitor.
Finds the monitor where the specified rectangle is located.

MonitorFromRect is a TMonitor function used to get the monitor where the coordinates in the specified rectangle are located.

MonitorDefault is a TMonitorDefaultTo enumeration value which indicates the monitor used when the coordinates in Rect are not found on a monitor. See TMonitorDefaultTo for more information about the values in the enumeration and their meanings.

MonitorFromRect calls the corresponding method in the widgetset class to get the Handle for the monitor where Rect is located. It searches Monitors for the TMonitor instance with the Handle value, and uses the TMonitor instance when the Handle is found. The UpdatedMonitor method is called to ensure that the value in Monitors are up-to-date.

When the Handle contains -1 (MONITOR_UNIMPL), the value in MonitorDefault us used to locate a monitor which intersects the coordinates in Rect. The return value is set to the TMonitor instance in Monitors which corresponds to the value in MonitorDefault. If a monitor is not found, the return value is set to PrimaryMonitor or the closest match as needed for MonitorDefault.

The TMonitor instance where the rectangle is located.
Rectangle with the screen coordinates to locate in the method.
Monitor use when the specified rectangle is not found on a monitor.
Finds the monitor containing the form with the given window handle.

MonitorFromWindow is a TMonitor function used to locate monitor where the form represented by the specified window Handle is displayed.

MonitorDefault is a TMonitorDefaultTo enumeration value which indicates the monitor used when the display area for the form is not found on a monitor. See TMonitorDefaultTo for more information about the values in the enumeration and their meanings.

MonitorFromWindow calls MonitorFromWindow in the widgetset class to get a monitor handle used to locate the monitor in the Monitors property. The UpdatedMonitor method is called to ensure that Monitors contains up-to-date values for the available monitors.

If a monitor with the Handle is not found, GetWindowRect is called to get the display areas for the monitor Handle. MonitorFromRect is called to locate the monitor which contains the rectangle.

The monitor found.
The window handle to use.
What to return when no monitor was found.
Sets the Cursor property to a temporary shape. Use EndTempCursor to release it.

BeginTempCursor is a method used to change the cursor shape to the temporary cursor in the ACursor argument. It adds the value in ACursor to an internal list of temporary cursors. The cursor shape is removed when the EndTempCursor method is called.

BeginTempCursor calls SetCursor in the widgetset class to change the cursor shape to the value in Cursors stored at the index in ACursor.

Use EndTempCursor to remove a given cursor shape, and restore the cursor to a previous value.

TCursor
Identifies the temporary cursor shape to apply to the screen.
Releases a temporary cursor set with BeginTempCursor.

EndTempCursor is a method used to release the temporary cursor shape in ACursor. It removes the value from the internal list of temporary cursors updated in the BeginTempCursor method. Only the cursor shape in ACursor is removed from the list; other values are left intact.

EndTempCursor calls SetCursor in the widgetset class to apply the cursor shape in RealCursor.

An Exception is raised with the message 'Unbalanced BeginTempCursor/EndTempCursor calls for cursor' if ACursor is not found in the list of temporary cursors.

Use BeginTempCursor to display and store a temporary cursor shape.

Raises an Exception with the message 'Unbalanced BeginTempCursor/EndTempCursor calls for cursor' if ACursor is not found in the list of temporary cursors.
Identifies the cursor shape released in the method.
Sets the cursor to the shape in crHourGlass.

Calls BeginTempCursor using the cursor shape in crHourGlass.

crHourGlass
Removes the crHourGlass cursor shape.

Calls EndTempCursor to remove the crHourGlass cursor shape.

crHourGlass
The control which has the focus on the active form for the screen.

ActiveControl is a read-only TWinControl property which indicates the form or control that has focus on the screen, and gets input entered using the keyboard. The property value is updated when the SetFocusedControl method in TCustomForm sets the active control for the form and calls the UpdateLastActive method for the screen.

TCustomForm.SetFocusedControl
The TCustomForm instance which has the focus.

ActiveCustomForm is a read-only TCustomForm property which contains the active custom form instance which has focus on the screen. The property value is updated in TCustomForm methods like SetFocusedControl and MoveToDefaultPosition. It is also updated in TApplication methods like ControlDestroyed.

Use ActiveForm to get the TForm instance that has focus on the screen.

The TForm instance which has the focus.

ActiveForm is a read-only TForm property which contains the form instance in the application which has focus on the screen. The property value is updated from methods in TCustomForm like SetFocusedControl and MoveToDefaultPosition. It is also updated from methods in TApplication like ControlDestroyed.

Use ActiveCustomForm to get a form instance derived from TCustomForm, including: THintWindow, TCustomDockForm, and TLazDockForm. These class types are not available in ActiveForm.

Indicates the current mouse cursor shape.

Cursor is a TCursor property which identifies the current cursor shape drawn on the screen. The numeric value is the HCURSOR handle for the image drawn as the cursor shape. Cursor constants (like crHourGlass) defined in the controls.pp unit can be used instead of the numeric value.

Cursor is used as an index into the values in the Cursors property where the handle for the TCursorImage resources are stored. Changing the value for the property causes the SetCursor method in the widgetset class to be called to apply the handle in Cursors at the position in Cursor.

Gets the value for the Cursor property taking temporary cursors into account.

RealCursor is a read-only TCursor property which provides the current shape for the cursor taking temporary cursors into account.

Temporary cursors are added and removed using the BeginTempCursor and EndTempCursor methods. When a temporary cursor exists, RealCursor returns the most recent cursor shape added to the internal list using BeginTempCursor. If the internal list is empty, the value in Cursor is returned as the property value.

The value from RealCursor is used in the SetCursor method to determine the value stored in the Cursor property, and passed as an argument to SetCursor in the widgetset class.

Provides indexed access to the available cursor shapes for the screen.

Cursors is an indexed HCURSOR property which provides access to the handle for a cursor shape by its numeric value. The cursor constants (like crHourGlass) defined in the controls.pp unit can be used instead of the numeric value.

Cursors uses an internal TMap instance to store the handle values and provides access using the index values. When the value for the property is read, CreateStandardCursor in the widgetset class is called to retrieve the handle. If it has not been assigned, a temporary TCursorImage is created for the cursor resource and its handle is added to the internal map.

Setting a new value for the indexed property causes an existing handle in the internal map to be re-created.

Ordinal position for the requested cursor shape.
Number of TCustomForm form instances in the CustomForms property.

CustomFormCount is a read-only Integer property which contains the number of TCustomForm instances stored in the CustomForms property. Read access for the property value is redirected to the Count property in CustomForms.

Provides indexed access to the TCustomForm instances on the screen.

CustomForms is a read-only indexed TCustomForm property which provides access to a custom form instance in the list by its ordinal position.

Values in the CustomForms property are added and removed when the CreateNew and Destroy methods in TCustomForm are executed.

Use CustomFormsZOrdered to access a custom form instance by its Z-order on the screen.

Use the Forms property to access a TForm instance on the screen by its ordinal position.

Ordinal position for the requested form.
The list of Custom Forms, indexed by Z-order (zero is top-most).

CustomFormsZOrdered is a read-only indexed TCustomForm property which provides access to a custom form by its ordinal position in the Z-Order for the screen. The form at position 0 (zero) is displayed at the top of the Z-Order, and overlaps any form with a higher Z-Order value.

Values in the property are added and removed in the AddForm and RemoveForm methods.

CustomFormsZOrdered is used in widgetset classes when an application on the screen is minimized or maximized, or when a form is hidden or displayed using the ShowHide method in its widgetset class.

Use CustomFormZOrderCount to get the number of custom form instances in CustomFormsZOrdered.

Use CustomForms or Forms to access a form instance by its ordinal position in the list of forms on the screen.

TWinControl.Showing
Ordinal position in the Z-Order (0 is top-most).
Number of custom forms instances in the CustomFormsZOrdered property.

CustomFormZOrderCount is a read-only Integer property which contains the number of TCustomForm instances stored in the CustomFormsZOrdered property. Read access for the property value is re-directed to the Count property in the list used for CustomFormsZOrdered.

Use CustomForms and CustomFormCount to access TCustomForm instances on the screen regardless of their Z-Order.

Use Forms and FormCount to access TForm instances on the screen regardless of their Z-Order.

The left-most coordinate of the desktop.

DesktopLeft is a read-only Integer property with the left coordinate for the desktop. The property value contains the virtual screen size returned from GetSystemMetrics for the SM_XVIRTUALSCREEN parameter.

DesktopLeft is used in the MoveToDefaultPosition method in TCustomForm. The values in DesktopLeft, DesktopTop, DesktopWidth and DesktopHeight are also assigned to members in the DesktopRect property.

The top-most coordinate for the desktop.

DesktopTop is a read-only Integer property with the top coordinate for the desktop. The property value contains the virtual screen size returned from GetSystemMetrics for the SM_YVIRTUALSCREEN parameter.

DesktopTop is used in the MoveToDefaultPosition method in TCustomForm. The values in DesktopLeft, DesktopTop, DesktopWidth and DesktopHeight are also assigned to members in the DesktopRect property.

The total vertical size for the desktop.

DesktopHeight is a read-only Integer property with the total height for the desktop. The property values is the result from GetSystemMetrics using the SM_CYVIRTUALSCREEN parameter.

DesktopHeight is used in the MoveToDefaultPosition method in TCustomForm. The values in DesktopLeft, DesktopTop, DesktopWidth and DesktopHeight are also assigned to members in the DesktopRect property.

The total horizontal size for the desktop.

DesktopWidth is a read-only Integer property with the total width for the desktop. The property values is the result from GetSystemMetrics using the SM_CXVIRTUALSCREEN parameter.

DesktopWidth is used in the MoveToDefaultPosition method in TCustomForm. The values in DesktopLeft, DesktopTop, DesktopWidth and DesktopHeight are also assigned to members in the DesktopRect property.

Bounds rectangle for the desktop spanning all monitors.

DesktopRect is a read-only TRect property with the bounds for the desktop spanning all monitors. Member values in the property are derived from the DesktopLeft, DesktopTop, DesktopWidth, and DesktopHeight properties.

DesktopRect is provided as a convenience property; it is not used directly in the LCL.

The form that has Focus on the screen.

FocusedForm is a read-only TCustomForm property which contains the form which has focus on the screen. The value for the property is maintained in the SetFocusedForm method, which ensures that the previously focused form is deactivated before setting the value in the property. It is also updated in the RemoveForm method when the freed form instance is the current value for the property.

FocusedForm is updated in the ShowModal method in TCustomForm when the focus is changed to a modal form. It is also updated in the ControlDestroyed method in TApplication when the freed control is also the current value for the property.

The value in the property is used to prevent hint windows from being displayed for other forms when a modal form is active.

The number of Forms on the screen.

FormCount is a read-only Integer property with the number of TForm instances stored in the Forms property. Read access to the property value is redirected to the Count property in Forms.

Use CustomFormCount to get the number of TCustomForm instances in the CustomForms property.

Provides indexed access to TForm instances on the screen.

Forms is a read-only indexed TForm property which provides access to the TForm instances on the screen by their ordinal position in the list of forms. Index values must be in the range 0..FormCount-1. An EListError exception is raised when Index contains an invalid position for the list.

Values are added to and removed from Forms in the AddForm and RemoveForm methods. These methods are called when the CreateNew or Destroy method in TForm is executed. Forms is used in widgetset classes to get the form instance with a given Handle in the widgetset.

Use CustomForms and CustomFormCount to access the TCustomForm instances on the screen.

Raises an EListError exception when Index contains an invalid position for the list.
Ordinal position for the form in the property value.
The number of data modules for the screen.

DataModuleCount is a read-only Integer property with the number of TDataModule instances stored in the DataModules property. Read access for the property value is redirected to the Count property in DataModules.

Use DataModules to access a TDataModule instance by its ordinal position in the list of data modules.

Provides indexed access to data modules on the screen.

DataModules is a read-only indexed TDataModule property which provides access to a data module by its ordinal position in the list. Data modules are a non-visual component at run-time, and are provided to maintain compatibility with the Delphi VCL equivalent.

Index contains the ordinal position in the list for the property value, and must be in the range 0..DataModuleCount-1. An EListError exception is raised if Index has an invalid position for the list.

Use DataModuleCount to get the number of data module instances in the property.

TDataModule
Ordinal position for the TDataModule instance in the property value.
The font used to display Hints.

HintFont is a TFont property with the font used to display hint text for forms and controls. Reading the property value causes the InitStockFont method in the widgetset class to be called. If the hint font is not initialized in the widgetset class, default font attributes are assigned to the font instance using the color in clInfoText.

The value in HintFont is used to set the default font for THintWindow instances, It can be used in controls which display their own custom hint windows and hint text should be displayed in the default font for the platform.

The Icon font used for desktop icons.

IconFont is passed to the InitStockFont method in the widgetset to initialize the font.

Not used in the current LCL implementation.
The font used in menus.

Currently used only in FindFontName in the TurboPower IPro package.

The default font used for system task dialogs and controls like TSpeedButton.
The names for the available (installed) fonts.

Fonts is a read-only TStrings property which contains the names for the fonts available using the EnumFontFamiliesEx routine for the widgetset. Values in Fonts are sorted alphabetically in ascending order.

The height of the primary monitor.

Height is a read-only Integer property with the height of the primary monitor for the system. The property value contains the result from GetSystemMetrics using the SM_CYSCREEN parameter.

Values in Height and Width are used when setting the position for forms or other dialogs to ensure that they are visible on the monitor. They are also used when LCL coordinates are converted to screen coordinates to ensure that the positions are valid for the monitor.

The number of available Monitors.

MonitorCount is a read-only Integer property with the number of TMonitor instances stored in the Monitors property. Reading value for the property causes the UpdateMonitors method to be called when Monitors is empty. The property value is redirected to the Count property in Monitors.

Use Monitors to access a TMonitor instance by its ordinal position in the list.

Provides indexed access to the available monitors in the class instance.

Monitors is a read-only indexed TMonitor property which provides access to the available monitors in the class instance by their ordinal position in the list.

Reading a value for the property causes the UpdateMonitors method to be called when the number of monitors in the TMonitorList instance is 0 (zero). The property value is the TMonitor instance in the list at the specified ordinal position.

Use MonitorCount to get the number of entries stored in the Monitors property.

Ordinal position for the TMonitor instance in the property value.
The number of screen pixels per virtual inch (DPI) for the screen.

PixelsPerInch is a read-only Integer property which contains the number of screen pixels per inch for the display device. The display uses virtual inches, which typically are bigger than physical inches. This requires that text appear bigger on a screen than on a printer.

The default value for the property is set in the constructor for the class instance using the horizontal pixels per inch from the ScreenInfo variable in the graphics unit. The value is updated (from the same source) when the UpdateScreen method is called.

The property value is used at run-time to detected when scaling is needed in forms, controls, and fonts to adjust for different design-time PPI settings.

The primary monitor which typically includes the task bar area.

PrimaryMonitor is a read-only TMonitor property with the primary monitor for the system. The property value is determined by checking for the TMonitor instance in Monitors with its Primary property set to True. The property value is Nil if a monitor is not found with its Primary property set to True.

The property value is used in the MoveToDefaultPosition method in TCustomForm. It is also used in widgetset classes to select the monitor for a dialog when the main form for an application has not been assigned.

The width of the primary monitor.

Width is a read-only Integer property with the width for the primary monitor. The property value is the result from GetSystemMetrics using the SM_CXSCREEN parameter.

Use Height to get height for the primary monitor.

Use DesktopWidth to get the usable width for the desktop minus the area reserved for a task bar.

The usable display area on the primary monitor excluding the task bar.
The usable height of the primary monitor excluding the task bar.
The usable left coordinate on the primary monitor.
The usable top coordinate on the primary monitor.

Returns the value for the Top member in WorkAreaRect, which omits the task bar area if aligned to the top of the screen.

Use the DesktopTop property to get the coordinate for the top of the primary monitor.

The usable width for the WorkAreaRect.

Returns the difference between the Right and Left members in WorkAreaRect.

Use DesktopWidth to get the width for the primary monitor including the task bar area.

Event handler signalled when the active form control for the screen has been changed.

OnActiveControlChange is a TNotifyEvent property with the event handler signalled when the active control on the screen has been changed. The Sender argument contains the TScreen instance for the change notification.

OnActiveControlChange is signalled (when assigned) from the UpdateLastActive method, and occurs after the OnActiveFormChange event has been signalled (when assigned).

TNotifyEvent
Event handler signalled when the active form on the screen has been changed.

OnActiveFormChange is a TNotifyEvent property with the event handler signalled when the active form on the screen has been changed. Sender contains the TScreen instance for the change notification.

OnActiveFormChange is signalled (when assigned) from the UpdateLastActive method, and occurs before the OnActiveControlChange event handler.

TNotifyEvent
Specifies an event type used to handle a WM_QUERYENDSESSION window message in an application.
Set Cancel to True to prevent the session from ending.
Defines an event handler signalled to perform exception handling in an application.

TExceptionEvent is an object procedure type that defines an event handler signalled to perform exception handling in an application. Arguments passed to the event handler identify the application generating the notification, and the exception class instance. Applications must implement an object procedure using the signature for the event, and assign it to an event handler to respond to the notification.

TExceptionEvent is the type used to implement exception handlers in TApplication and TApplicationProperties.

Object instance for the notification.
Exception instance for the notification.
Specifies an event handler used to get the handle for the main form in an application.

TGetHandleEvent is an object procedure type which defines an event handler signalled to get the handle for the main form in an application. TGetHandleEvent is the type used to implement the OnGetMainFormHandle event handler in TApplication and TApplicationProperties.

Handle for the form instance used as the main form.
Specifies an event handler signalled when an application becomes idle.

TIdleEvent is an object procedure type which specifies an event handler signalled when an application becomes idle.

Sender is the object for the event notification and normally contains the Application singleton.

Done is a variable Boolean parameter which indicates if the event handler has finished processing. When set to False, subsequent idle event handlers can be called. When set to True, the idle state processing has been completed.

TIdleEvent is the type used for the OnIdle event handler in TApplication. The event handler is signalled when the application becomes idle. The event handler can return False in Done to allow other idle event handlers to be signalled. The idle event handlers are called repeatedly until Done is set to True.

Use the TIdleEvent event handler type to provide short duration event handlers which ensure that the application remains responsive.

Object for the event notification.
Set to True when processing is done.
Specifies an event handler signalled to respond to user input messages in an application.

TOnUserInputEvent is an object procedure type which defines an event handler signalled to respond to user input messages in an application. It is used as a callback which forwards input messages from widgetset classes to the current application.

TOnUserInputEvent is the type used for the OnUserInput event handler in TApplication and TApplicationProperties.

Object for the event notification.
Message with the user input for the event.
Specifies the type used for an asynchronous callback method.
PtrInt type with the argument passed to the method.
Provides access to members in a CM_HINTSHOW control message.

TCMHintShow is a record type used to represent a CM_HINTSHOW control message passed as an argument to methods in a control.

TControl.CMHintShow
Cardinal value representing the control message.
Reserved parameter values for the message.
Pointer to the hint information for the control message.
Result returned for the control message.
Not used in the current LCL implementation.

TCMHintShowPause is not used in the current LCL implementation.

Represents TApplication hint timer states.

TAppHintTimerType is used in the implementation of the TApplication class, and passed as an argument to its StartHintTime method.

The hint timer is off.
Waiting to show a hint; used when a hint timer is started.
Waiting to hide an hint; used when the hint control is changed or the mouse leaves a hint rectangle.
Waiting to show the next hint; used when the hide hint timer is started.
Defines an event handler signalled to perform hint display.

TShowHintEvent is an object procedure type which defines an event handler signalled to perform hint display. It is the type used for the TApplication.OnShowHint event handler property.

Text for hint display event.
True if the hint can be displayed.
Hint info structure for the hint.
Stores control and mouse position information for a hint display.

THintInfoAtMouse is a record type used to store Control and Mouse position information for a hint display.

THintInfoAtMouse is passed as an argument to the ShowHintWindow method in TApplication. It is also used in the implementation of TApplication methods like ActivateHint and OnHintTimer.

Position of the mouse cursor for the hint display.
Control for the hint display.
Indicates if hint text is available for form or control.
Application state flags.

TApplicationFlag is an enumeration type with values that represent activity or state in an application. TApplicationFlag values are stored in the TApplicationFlags type used to implement the Flags property in TApplication.

Application is in an Idle state and waiting for a message.
IdleEnd handlers have been notified of message arrival; end the idle state for the application.
In exception handling.

Not used in the current LCL version.

Suppresses exception display for the application; set when an exception is aborted in the application.
The application has focus; prevents recursive application activation.
Shutting down; set when the application instance is freed.
Skip asynchronous callbacks between handled messages.

Included in Flags when the application is being destroyed. Causes an exception to be raised in QueueAsyncCall.

Application has been initialized.
Set type used to store values from the TApplicationFlag enumeration.

TApplicationFlags is the type used for the Flags property in TApplication.

Which keys can be used for the navigation within a form.

TApplicationNavigationOption is an enumerated type with values that control the behaviors enabled for navigation in an application. Values from TApplicationNavigationOption are stored in the TApplicationNavigationOptions set type used to implement the Navigation property in TApplication.

The Tab key moves the Focus to the next (or previous) control in TabOrder.
The Enter key triggers the default action.
The Escape key triggers the Cancel action.
The F1 key brings up context sensitive help.
The Arrow keys move the focus.
Types of Application notification handlers.

TApplicationHandlerType is an enumerated type with values that identify handler categories used in TApplication.

TApplicationHandlerType is used as an index value for the internal array of TMethodList instances used in TApplication. It is passed as an argument to the AddHandler and RemoveHandler methods in TApplication to identify the method list where the handler is stored. It is also used in the implementation of TApplication methods used to retrieve, execute, or maintain handlers such as: Destroy and RemoveAllHandlersOfObject.

Application becoming idle.
Application idle state is ending.
Handler for KeyDown events, invoked before interface and LCL handlers.
Default handler for KeyDown events, invoked after interface and LCL handlers.
Handler invoked on application activated.
Handler invoked on application deactivated.
Handler invoked on user input.

Used in NotifyUserInputHandler; implemented in Sparta MDI package

Handler invoked on handled exception.
Handler invoked on session end.

Used in IntfEndSession.

Handler invoked before session ends.
Handler invoked when the application is minimized.
Handler invoked when a form is shown modally.
Handler invoked when the last modal form is closed.
Handler invoked on application restored (from minimized state).
Handler invoked on files dropped.

Used in IntfDropFiles.

Handler invoked on F1 key (help request).

Used when OnHelp is not assigned in the application.

Handler invoked on Hint request.
Handler invoked on Hint becoming visible.
Handler provides the Handle for the main form.
A queued asynchronous callback request node.
Record used for a queued asynchronous callback request.
Object procedure with the callback method.
Pointer to the callback method argument.
Pointer to the next item in the callback queue.
Pointer to the previous item in the callback queue.
Represents an asynchronous callback queue.
The first queued callback request.
The last queued callback request.
Management information for asynchronous callbacks.

Two queues are used in TAsyncCallQueues. New calls are added to the Next queue. Cur contains the callbacks currently being processed in the queue.

When the application starts processing the calls, the Next queue becomes the Cur queue, and a new Next queue is created. This simplifies thread-safe addition in subsequent calls.

The critical section for adding and removing queue elements.
The currently processed queue. Processed entries are removed.
New calls are added to this queue.
Identifies the kind of device where the application currently runs.

TApplicationType identifies the kind of device where the application currently runs. Note that the same application can run on differing device types if it has a flexible user interface.

TApplicationType is the type used to implement the ApplicationType property in TApplication, and returned from widgetset methods that identify the platform for the interface.

The widgetset will attempt to auto-detect the device type.
For common desktops and notebooks.
For smartphones and other devices with a smallish touchscreen.
Devices without any pointing device, such as keypad feature phones or kiosk machines.
Enumeration with dialog types for an application.

TApplicationExceptionDlg is an enumerated type with values that indicates the type of dialog displayed for an application exception. TApplicationExceptionDlg is the type used to implement the ExceptionDialog property in TApplication and TApplicationProperties.

Exception handler window will be a dialog with Ok/Cancel buttons.
Exception handler window will be a simple message box.
Describes the policy for the application of how to show menu and button glyphs.

TApplicationShowGlyphs is an enumerated type with values that indicate the policy for displaying glyphs on menus and buttons. TApplicationShowGlyphs is the type used to implement the ShowButtonGlyphs and ShowMenuGlyphs properties in both TApplication and TApplicationProperties.

TGlyphShowMode
Show glyphs always (disregards system preferences).
Show glyphs never (disregards system preferences).
Show glyphs according to the platform or OS preferences.
How forms are represented in the TaskBar.

TTaskBarBehavior is an enumerated type with values that define how forms are displayed in the task bar. TTaskBarBehavior is the type used to implement the TaskBarBehavior property in TApplication.

Some Linux window managers do not support task bar behaviors. For example: Cinnamon.
Show TaskBar buttons according to the platform default.
Show buttons for Forms with ShowInTaskBar=stDefault.
Hide buttons for Forms with ShowInTaskBar=stDefault.
Enumeration with values used in the DoubleBuffered property in TApplication.
Widgetset dependent. For Windows, it is True unless in a remote desktop connection. For other widgetsets it is False.
DoubleBuffered is not used on the platform.
DoubleBuffered is used on the platform.
Application management and configuration for a GUI application.

TApplication is a TCustomApplication descendant which provides facilities used to manage and configure a GUI application. Properties, methods, and event handlers are provided which allow a program to create, execute, monitor, maintain and destroy an application and its forms. Every GUI application contains an Application variable that represents the TApplication or descendent class instance.

TApplication provides a message processing loop that includes hooks for event handlers and exception handling, and supports dispatching messages for TCustomAction instances used in application forms. TApplication provides support for hints and content-sensitive help for forms and controls used in the application. Convenience methods, like MessageBox, are provided to simplify access to dialogs and error messages in the application.

Holds the registered handler routines for the application.
The list of components marked for release.
The list of components which currently are released (destroyed).
The screen area of the current Hint window.
The timer for showing and hiding Hints.
The Hint time mode.
The current Hint window.
The Handle for the big application icon.
The Handle for the small application icon.
Counter for nested Idle locks, preventing execution of OnIdle handlers.
Cached key event parameter.
List of key values for the last KeyDown sender.
Cached key event parameter.
The previously installed exception handler.
Queues for asynchronous calls.
Cached mouse event parameter.
Cached mouse event parameter.
Cached mouse event parameter.
The list of all forms that should be restored to StayOnTop.
The list is created in RemoveStayOnTop, processed in RestoreStayOnTop.
Notifies the OnIdleEnd handlers when the application exits Idle state.
Gets the HelpFile name for the active form, or the Application.

GetCurrentHelpFile is a String function used to get the help file name for the active form or application.

GetCurrentHelpFile checks for an active form in the Screen singleton. If a form is active, the file name in its HelpFile property is used as the return value. If a form is not active, the HelpFile in the Application instance is used.

Help file name located in the method.
Gets the name of the executable for the application.

GetExename is a String function used to get the name of the executable file which started the application. The return value contains the first command line parameter (ordinal position 0) returned from the ParamStrUTF8 routine in LazUtils.

Name of the executable file used to start the application.
Gets the value for the Handle property.

Returns the AppHandle property from the WidgetSet singleton.

The Handle for the application.
Determines the main form handle, using all available handlers.
Handle value for the main form.
Gets the value for the Title when it is not already stored in the property.

Extracts the program name from the command line arguments when Title is unassigned.

Value for the Title property.
Destroys the application icons.

FreeIconHandles is a procedure used to free icon handles used in the application. FreeIconHandles ensures that the internal members for the small and large icon handles are destroyed (when assigned). The DestroyIcon routine is called to destroy each of the icon handles using the correct routine for the widgetset implementation.

FreeIconHandles is called from the destructor for the class instance, and when an icon for the application has been changed.

Implements the OnChange event handler used for the Icon in the application.

IconChanged is a method used to load the new application icon, and to notify the widgetset and all forms of the change. It implements the OnChange event handler assigned to the Icon for the application.

It frees existing handles both the small and large versions of the Icon for the application, and calls the AppSetIcon method in the widgetset class to re-create the handles.

IconChanged posts a CM_ICONCHANGED control message to each of the TCustomForm instances in the Screen singleton. Unassigned handle values are provided for both the small and large icons on the form.

Object for the event notification.
Sets the value for the BiDiMode property.

SetBidiMode is a method used to set value for the BiDiMode property. It updates the property value, and calls NotifyCustomForms to post a CM_PARENTBIDIMODECHANGED control message to all TCustomForm instances on the Screen.

New value for the property.
Sets the value for the Flags property.

SetFlags allows the value AppNoExceptionMessages to be added to or removed from the values in the TApplicationFlags set type. All other existing values in Flags are not modified.

New value for the property.
Sets the value for the MainFormOnTaskBar property.

Calls the AppSetMainFormOnTaskBar method in the widgetset class to apply the new value for the property.

New value for the property.
Sets the value for the Navigation property.
New value for the property.
Sets the value for the ShowButtonGlyphs property.

Updates the property value, and calls the NotifyCustomForms method to post a CM_APPSHOWBTNGLYPHCHANGED control message to TCustomForm instances for the application.

New value for the property.
Handles mouse movement to a new control.
Sets Hint to the (new) hint that applies to CurrentControl.
The control under the mouse.
Disables the Hint timer.
Checks for an installed HelpManager.
True when HelpManager is not Nil.
Asks the active form and MainForm to handle the action.
True when the action was handled.
Adds an application notification handler.
Removes an application notification handler.
Encapsulates the application message loop (HandleMessage).
Handler for application activation, notifies all activation handlers.
Handler for application deactivation, notifies all deactivation handlers.
True when called from the widgetset.
Always returns False for a GUI application.
False for a GUI application.
Signals all idle handlers for the application.

NotifyIdleHandler is a method used to signal event handlers using the ahtIdle application handler type.

The internal array of handlers is checked for a TMethodList which uses the application handler type. If it exists, each of the methods in the list are signalled, in reverse order, using the value in Done as a control flag. While Done is True, the handlers are continuously called in the loop. If any handler in the list sets Done to False, the method is exited.

NotifyIdleHandler is called from the Idle method. It occurs after the ReleaseComponents and ProcessAsyncCallQueue methods have been called. It is also called after the OnIdle event handler in the TApplication has been signalled (when assigned) and when the Done argument to the event handler is True.

True when all handlers are done, meaning: wait for next message.
Notifies all Idle End handlers when a new message has arrived.
Notifies all Activation handlers for the application.
Notifies all Deactivation handlers for the application.
Performs the specified message for all custom forms in the application.

Calls the Perform method for custom forms in the application using Msg as an argument.

TControl.Perform
The message sent to the forms.
Exists for Delphi compatibility only.

Always returns False in TApplication. Provided for Delphi code compatibility only.

Always returns False.
Not used in the implementation.
Signals an OnHelp event handler.

Signals the OnHelp message handler. Tries the OnHelp handlers for the active form and the Application, as well as handler routines added for the ahtHelp handler type.

DoOnHelp is called from the HelpCommand method.

True when the message was handled.
OnMouseMove message handler, updates the Hint.
Shows or hides the Hint window.
Is updated with the Hint related information.
Event handler for timing the duration of hints.
Sets the value for the Title property.

Calls the inherited method on entry. Calls the AppSetTitle method in the widgetset class to apply the new value for the property.

New value for the property.
Starts the timer for display of a hint message.
Asks the widgetset to update the task bar entries.
Updates all Actions and hides splash screens.
Implements the OnMenuPopupHandler for the application.

Assigned as the handler routine for the OnMenuPopupHandler variable in the LCL when the application instance is created.

Calls the HideHint method to manage values in HintWindow, HintControl, and HintRect (when needed).

OnMenuPopupHandler
Object for the event notification.
Calls all methods queued in QueueAsyncCall.
Ignored, should be zero.
Destroys all components marked for release.
Destroys all components.

Called from the BeforeFinalization routine which is used as the ExitProc handler in the application instance.

Returns the command line argument at the specified position.

GetParams is an overridden String function in TApplication used to get the argument at the specified position in the command line. It re-implements the read access specifier for the property from the ancestor class, and does not call the inherited method.

Index is the ordinal position for the requested parameter value. Index must be in the range 0..ParamCount-1 or an EListError exception is raised. Position 0 contains the name of the executable file for the application.

The return value contains the UTF-8-encoded String with the value for the parameter at the specified position. It is retrieved using the ParamStrUTF8 routine for the position in Index.

ParamStrUTF8 TCustomApplication.Params TCustomApplication.ParamCount
String with the parameter value, or an empty string.
Ordinal position for the requested parameter value.
Constructor for the class instance.

Create is the overridden constructor for the class instance.

It ensures that the LCL is configured to use the private WndProc method to handle messages dispatched for the application instance.

Create allocates resources needed in the class instance, and sets the default values for properties. Event handler routines implemented in TApplication are assigned as needed.

Create calls the inherited constructor prior to exiting from the method.

TComponent.Create
The Owner object that invoked this instance of TApplication.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance.

Destroy ensures that the value AppDestroying is included in the Flags for the application, and signals the OnDestroy event handler (when assigned). Destroy calls the ProcessAsyncCallQueue method to process / handle queued asynchronous method calls pending for the application instance.

Hint display is cancelled and suppressed while the application is shutting down. The action component for the application is set to Nil to prevent execution of associated actions during shutdown.

Destroy frees resources allocated in the application instance, including the Icon and any Icon handles currently in use. Handlers added to application instance are also freed.

Destroy calls the inherited destructor, and discards any pending asynchronous calls not previously handled for the application instance. Exception handling is restored to the state on entry to the Create constructor. Finally, the Application class instance is set to Nil.

Destroy calls RaiseGDBException to raise an exception if the current class instance is unassigned (contains Nil). Uses the exception message 'TApplication.Destroy Self=nil'.

Raises an EAssertFalied exception if the CustomApplication and Application variables do not contain the same TCustomApplication instance.

Configures a hint window for the specified mouse position.

ActivateHint is a procedure used to configure a hint window display at the coordinates specified in CursorPos.

ActivateHint retrieves the hint information at the mouse position. If the control for the hint differs from the current hint control, the existing hint is deactivated. The new hint window sets its hint timer and calculates the rectangle for the hint window.

If a hint is not available for the specified mouse position, the CancelHint method is called.

ActivateHint is used in the implementation of the DoOnMouseMove and ShowHintWindow methods.

Mouse cursor position used to retrieve the hint information.
Indicates if hint controls are used to compared existing and new hint windows.
Gets the control under the mouse pointer.

GetControlAtMouse is a TControl function used to get the control under the mouse pointer. The return value contains the form or control at the position where the mouse pointer is located. The return value is Nil at design-time.

GetControlAtMouse updates internal members used to track the control and its position.

The control under the mouse pointer, or Nil at design-time.
Clears all references to the destroyed control.

ControlDestroyed is a method used to update the application when the control in AControl is freed. ControlDestroyed ensures that any property in the application that contains a reference to AControl is set to Nil, including:

- MainForm
- MouseControl
- HintControl
- CreatingForm (internal)

Properties in the Screen singleton are also updated to remove any references to AControl, including:

- ActiveControl
- ActiveCustomForm
- ActiveForm
- FocusedForm

The UpdateLastActive method in Screen is called to perform change notification for the forms and / or controls.

ControlDestroyed is called from the Destroy method in TControl.

TControl.Destroy
Control instance which is being freed.
The Handle for the large application Icon.
The Handle for the small application Icon.
Asks the widgetset to bring the last form for the application in front of all other programs.

Calls the AppBringToFront method in the widgetset class.

Creates a Form or component, owned by Application.
The method name is slightly misleading, and kept only for Delphi compatibility. The method can actually create any kind of component.

CreateForm creates a Component instance of the given class, and sets the pointer to the component variable. If it is a form, it will be added to the list of forms in the application.

A splash form is shown immediately.

The class type used to create the new instance.
The variable for the new component reference.
Makes the specified form the MainForm in the Application.

UpdateMainForm is a method used to make the form instance in AForm the main form for the application. It stores the value in AForm to the MainForm property. No actions are performed in the method for the following conditions:

- MainForm is already assigned.
- AForm is marked for release.
- The Handle for AForm has not yet been allocated.
- AForm is a MDI Child form (FormStyle contains fsMDIChild) or a splash screen form (FormStyle contains fsSplash).

UpdateMainForm is called from the CreateForm method, and occurs before the form calls its HandleNeeded method. It is also called when the Handle for a form is created (or re-created) in the CreateWnd method in TForm.

The form to use as the MainForm in the Application.
Inserts an asynchronous call into the queue.
This is thread safe.
Exceptions on various inconsistencies of the queue.
The method to call asynchronously.
The argument passed to the method.
Removes all calls added via QueueAsyncCall.
This is thread safe.
Exceptions on various inconsistencies of the queue.
Safely destroys a component used in the application.

ReleaseComponent is a method used to ensure that the component in AComponent is freed in the application. During normal processing, ReleaseComponent adds the TComponent instance to a list and queues an asynchronously call to FreeComponent. This allows the component to be freed when the application enters an idle state.

If the Application Flags contains AppDestroying, the Free method for AComponent is called immediately.

No actions are performed in the method if Destroy has already been called for AComponent (ComponentState contains csDestroying).

ReleaseComponent is called from the ReleaseComponents method in TApplication, and from the Release method in TCustomForm. It may also be used in the implementation of controls to ensure that its resources are freed as needed.

The component to destroy.
Signals the OnActionExecute handler (when assigned).

ExecuteAction is an overridden Boolean function used to signal the OnActionExecute (when assigned) using ExeAction as the action executed in the event handler. It sets the default value for the Handled argument to the event handler to False. The argument can be updated in the event handler, and is used as the return value for the method.

ExecuteAction re-implements the method defined in the ancestor, and does not call the inherited method.

TComponent.ExecuteAction
True when the Action was handled in the event handler.
The Action to execute in the event handler.
Signals the OnActionUpdate handler (when assigned).

UpdateAction is an overridden Boolean function used to signal the OnActionUpdate event handler (when assigned) to update the settings for the action in TheAction. It sets the default value for the Handled argument to the event handler to False. The argument can be updated in the event handler, and is used as the return value for the method.

UpdateAction re-implements the method defined in the ancestor, and does not call the inherited method.

TComponent.UpdateAction
True if the action was updated in the event handler.
The action updated in the event handler.
HandleException
method for handling an exception; attempts to maintain program execution if possible, otherwise exits gracefully.

Individual exception handler methods should be supplied by the application programmer, to override place-holder entries declared in ancestor classes. This method checks whether the application is halted when an exception occurs, or invokes the appropriate handler. It also writes details about the exception to the appropriate place for debugging.

TCustomApplication.HandleException
Handles pending messages, and enters the Idle state.

HandleMessage is a method used to process pending window or control messages in the application. It calls the AppProcessMessages method in the widgetset class to handle pending messages. It calls the Idle method to enter the idle state where queued asynchronous callbacks can be handled and idle handlers can be signalled.

It is very similar to the ProcessMessages method, which does not signal idle handlers for the application or wait for a new message before exit.

HandleMessage is called from the RunLoop method in TApplication.

Show help.

Currently relies on OnHelp handlers. CallHelp is not implemented.

Shows context-sensitive help for the application.

HelpContext is a Boolean function used to display context-sensitive help for the specified help context. It calls the DoOnHelp method to select and execute a help handler routine for the specified help context. The routine may be one of the OnHelp event handlers found in the active form or in TApplication. If neither are assigned, the application handlers are checked for a routine using the ahtHelp handler type.

If the help context was handled in DoOnHelp, not additional actions are performed in the method. Otherwise, the ShowHelpOrErrorForContext is called to handle the help request.

The return value is False if the help context could not be handled using any of these options.

True if the help request was handled in the method.
Help context displayed in the method.
Shows help for the specified keyword.
Displays the Help Table of Contents using the Help Manager for the application.

HelpShowTableOfContents is a method used to display the Help Table of Contents for the application. It uses the global HelpManager variable (when assigned) to call its ShowTableOfContents method. This method must be re-implemented in a descendent class; the default implementation simply returns the shrHelpNotFound result.

The return value is True when the HelpManager successfully displays the Table of Contents, and returns the shrSuccess result code. If HelpManager has not been assigned, the return value is always False.

HelpManager THelpManager.ShowTableOfContents TShowHelpResult
Added in LCL version 2.2.0. This method is Delphi compatible.
True if the Help Table of Contents was successfully displayed by the application.
When Sender is a TControl, invoke its ShowHelp method.
Should be a TControl, else nothing will happen.
Removes the StayOnTop attribute from all forms in the application.
Builds a list of forms for use in the RestoreStayOnTop method.
Restores StayOnTop for all forms changed by RemoveStayOnTop.
True if the application is waiting for a message event.

The return value is True when AppWaiting has been included in the Flags for the application.

True if the application is in AppWaiting state.
Called when the Hint time has expired, to stop showing the Hint.
Hides the Hint window.
Called when the the mouse is over a control with a Hint.
Does nothing.
Initializes the widgetset (and more).

Initialize is an overridden procedure in TApplication used to perform initialization tasks for the application. Initialize calls the inherited method to provide support for instance counting in the custom application. Initialize ensures that the WidgetSet class type is assigned for the application, and that the Screen singleton is initialized and updated.

Initialize raises an Exception if WidgetSet has not been assigned, or contains a class type other than TWidgetSet, for the application.

Initialize updates the Flags property to include the value AppInitialized when both the LCL interface (Widgetset) and the Screen singleton have been configured.

Initialize loads the graphic image used in the Icon property. If a resource with the name MAINICON is included in the Lazarus Resource, it is loaded and used as the application icon. Otherwise, FindResource is called to locate and load the named icon from the resource handle.

Raises an Exception if the WidgetSet class is invalid or not assigned.
WidgetSet TCustomApplication.Initialize
Display an message dialog with response buttons.

The function is used internally to display messages during the handling of Exceptions, but is also available to application programmers as an alternative to some of the message dialogs found in the Dialogs unit.

The function returns an integer value corresponding to the button that was pressed; its value can be determined by reference to the constants [IDOK..IDHELP].

MessageDlg
Indicates the pressed button.

Can be one of the following values:

- IDOK
- IDCANCEL
- IDABORT
- IDRETRY
- IDIGNORE
- IDYES
- IDNO
- IDCLOSE
- IDHELP

The text in the MessageBox.
The Caption of the MessageBox.
The icon and buttons appearing in the message box.

Several constants are declared in the LCLType unit.

Add (better: OR) an icon constant and a buttons constant. For example:

MB_ABORTRETRYIGNORE + MB_ICONQUESTION

Causes the application to display a query (?) icon in a box with three buttons: ABORT RETRY IGNORE.

Buttons can be one of:

- MB_OK
- MB_OKCANCEL
- MB_ABORTRETRYIGNORE
- MB_YESNOCANCEL
- MB_YESNO
- MB_RETRYCANCEL

The icon can be one of:

- MB_ICONHAND
- MB_ICONQUESTION
- MB_ICONEXCLAMATION
- MB_ICONASTERISK
- MB_ICONWARNING (same as MB_ICONEXCLAMATION)
- MB_ICONERROR (same as MB_ICONHAND)
- MB_ICONSTOP (same as MB_ICONHAND)
- MB_ICONINFORMATION (same as MB_ICONASTERISK)

Asks the widgetset to minimize the application.
Called when a modal form display is started.
Invokes all OnModalBegin handlers when entering Modal state.
Called when a modal form is closed.
Invokes all OnModalEnd handlers when exiting Modal state.
Restores a previously minimized application.

Calls the AppRestore method in the widgetset class, which generally restores the main form for the application and re-focuses its active control. It will also restore an active modal dialog.

Performs actions when a component is added to or removed from the application.

Notification is an overridden method in TApplication used to perform actions needed when a component is added to or removed from the application. Notification provides special handling when component references are removed. It ensures that the internal member for a given component is set to Nil when the reference is freed. If the freed component is the MainForm for the application, the Terminate method is called to shut down the application and update the OS-level ExitCode.

TComponent.Notification
Component for the notification.
Operation performed for the component reference.
Call this method during lengthy operations to ensure the GUI remains responsive.

Calls AppProcessMessages in the widgetset class to processes pending messages, and calls ProcessAsyncCallQueue to handle any queued asynchronous callbacks.

Called when the application enters the idle state.

Idle is a method used to perform actions when the application enters an idle state. It allows the application to free components pending release, and handle any queued asynchronous requests.

In addition, Idle calls event and application handlers assigned in the class instance. OnIdle is signalled (when assigned). NotifyIdleHandler is called to signal any application handler(s) using the ahtIdle handler type.

The DoIdleActions method is called to update the actions for Visible and Enabled forms, and to hide visible splash screen forms (FormStyle is fsSplash).

When the Wait argument is set to True, the AppWaitMessage method in the widgetset class is called to capture an message on the handles for the application. This action is not performed when Wait is False.

Idle calls the DoOnIdleEnd method to signal the OnIdleEnd event handler and any application handlers using the ahtIdleEnd handler type.

Indicates if the method waits for the next message.
Loads the MainForm and passes control to the event loop for the application.
TCustomApplication.Run
Shows the exception message and asks the user to abort or continue.
TCustomApplication.ShowException
The exception to display for the application.
Exception
The application is terminated and the component engine is shutdown.
TCustomApplication.Terminate
Disables Idle handling.

Blocks Idle handling by incrementing the internal idle lock counter. Can be called multiple times, but each call must be followed by EnableIdleHandler.

Used in the ShowException method while an exception dialog is active.

Resumes Idle handling.

Attempts to re-enable idle handling by decrementing the internal idle lock counter. Idle handling is enabled when the internal idle lock counter is 0.

Called from the ShowException method when the exception dialog is exited.

Raises a catchable GDB Exception if the idle handler has not already been disabled.
Notifies all user input handlers of the specified message.
Notifies all ahtKeyDownBefore handlers.
Notifies all ahtKeyDownAfter handlers, eventually reacts on F1 (Help).
Handles KeyDown events in a Control, e.g. handles navigation keys.
Handles KeyUp events in a Control, e.g. handles Enter and Esc keys.
Adds an application Idle handler.
Removes an application Idle handler.
Adds an application IdleEnd handler.
Removes an application IdleEnd handler.
Adds an application user input handler.
Removes an application user input handler.
Adds an application key down before interface handler.
Removes an application key down before interface handler.
Adds an application key down after interface handler.
Removes an application key down after interface handler.
Adds an application activation handler.
Removes an application activation handler.
Adds an application deactivation handler.
Removes an application deactivation handler.
Adds an application exception handler.
Removes an application exception handler.
Adds an application logoff handler.
Removes an application logoff handler.
Adds an application logoff query handler.
Removes an application logoff query handler.
Adds an application minimizing handler.
Removes an application minimizing handler.
Adds an application becoming modal handler.
Removes an application becoming modal handler.
Adds an application exiting modal state handler.
Removes an application exiting modal state handler.
Adds an application exiting minimized state handler.
Removes an application exiting minimized state handler.
Adds an application dropped files handler.
Removes an application dropped files handler.
Adds an application Help handler.
Removes an application Help handler.
Adds an application Hint handler.
Removes an application Hint handler.
Adds an application Hint show handler.
Removes an application Hint show handler.
Adds an application MainForm Handle handler.
Removes an application MainForm Handle handler.
Removes all handlers implemented in the given object.
Things to be done before a mouse message is processed.
Asks all shortcut handlers to handle the key.
True when the shortcut was handled.
Called by the interface to confirm the end of a session.
Asks all QueryEndSession handlers to confirm termination of the application.
Called by the interface when the session ends.
Notifies all OnEndSession handlers.
Called by the interface on application activation.
Notifies all activation handlers.
Called by the interface on application deactivation.
Called by the interface when the application is minimized.
Called by the interface when the application is restored.
Called by the interface when files have been dropped.
Called when the WM_SETTINGCHANGE message is handled for the application.

Calls GetFormatSettingsUTF8 or GetFormatSettings, depending on use of UTF-8 in the RTL, when UpdateFormatSettings is set to True. This applies to Windows platforms only.

Called by the interface when a theme option has changed.
Indicates if BiDiMode contains a value other than bdLeftToRight.
Checks the given language name for use of right-to-left reading.
True when the language code uses right-to-left reading.
ISO language code examined in the method.
Gets the BidiMode value for the specified language name.
TBiDiMode value for the specified language.
ISO language name examined in the method.
Uses arrow keys for navigation, if enabled.
The control receiving the key.
The virtual key; becomes VK_UNKNOWN when handled.
The active modifier keys.
Uses the Tab key for navigation, if enabled.
The control receiving the key.
The virtual key; becomes VK_UNKNOWN when handled.
Shift, Ctrl or Alt modifier for the virtual key.
Interprets Esc as Cancel action, if applicable.
The control receiving the key.
The virtual key; becomes VK_UNKNOWN when handled.
The active modifier keys.
Interprets Enter as the default action, if applicable.
The control receiving the key.
The virtual key; becomes VK_UNKNOWN when handled.
The active modifier keys.
True if the application is focused.

Active is a read-only Boolean property which indicates if the application is focused. Returns True if the AppActive flag has been included in the Flags for the application.

The value in Active (and Flags) is updated when the private Activate or Deactivate methods are called.

The type of the application (i.e. the sort of device for which it is intended).

The type of the application:

Default, Desktop, Handheld, PDA, Smartphone

The bidirectional mode to use.
Enables exception handling by Application.
Indicates if the application uses double buffering.
Default value is adbDefault. Hint: platform specific.
Controls whether extended key codes are available in key down and key up messages.

When enabled, ExtendedKeysSupport causes Shift, Ctrl, and Alt (Menu) (Options or Mac OS) to generate distinct values for the left and right keys. The values can then be handled in OnKeyDown and OnKeyUp event handlers, or in overridden KeyDown and KeyUp methods.

See VK_LSHIFT in LCLType for more details.

Indicates the dialog type used for an exception in the application.

ExceptionDialog is a TApplicationExceptionDlg property which indicates the dialog type displayed for an exception handled by the application instance. The default value for the property is aedOkCancelDialog, as assigned in the Create constructor.

See TApplicationExceptionDlg for more information about values in the enumeration and their meanings.

Enables searching for global components by name.
Contains state flags for the application.

Flags is a TApplicationFlags property which contains flag values currently enabled for the application. It is a set type, and may contain zero or more values from the TApplicationFlag enumeration.

Values in Flags are updated when methods are executed in the class instance. A value may be transient in nature, and exist only while a particular method is running. They may also be more permanent, and indicate actions which have been performed and/or completed.

Values are added to and removed from Flags in methods like:

- Create
- Destroy
- Initialize
- Activate
- Deactivate
- Idle
- ShowException

Provides access to the widgetset handle for the application instance.

Handle is a THandle property which provides access to the widgetset handle used for the application instance. Reading the value for the property is redirected to the AppHandle allocated in the widgetset class. Setting the value for the property causes the AppHandle in the widgetset class to be updated with the new value.

Handle is used to send and receive window messages and state change notifications for the application instance using the LCL interface.

The current Hint text.

A hint is a pop-up message that appears briefly while the mouse hovers over a control. It usually displays useful information about how to use the UI element, or the type of data that should be entered, etc.

Other properties can be used to customize the delay before a Hint is shown, after the mouse is moved away from the control or form, and how long it will remain visible.

The background color for a Hint window.
How long a Hint stays visible after the mouse pointer is moved.
How long a keystroke extends the time a Hint remains visible (added to HintHidePause).
The delay before a Hint is shown.
Enables the display of keyboard shortcuts (e.g. on menu entries).
The pause before a different Hint is displayed.
The icon associated with this application.
Indicates the layout and sizing policy used for forms and controls in the application.
Allows switching between controls using keyboard navigation.

By default, the following keys can be used for keyboard navigation in an LCL application:

Tab, Shift+Tab
  Moves the Focus to the next (or previous) control in TabOrder.
Enter
  Triggers the default action for the form or control.
Escape
  Triggers the Cancel action for the form or control.
F1
  Displays context sensitive help (when available).
Cursor or arrow keys
  Moves the focus or cursor.

Contains the main form for the application.

MainForm is a read-only TForm property which contains the form that is the main or primary form for the application.

The value in MainForm is assigned when the first form is created using the CreateForm method and the FormStyle for the form contains a value other than fsSplash.

The form instance in MainForm is displayed when the Run method is called to start the message processing loop for the application.

The application is terminated when this form is closed.

Window handle for the MainForm in the application.

MainFormHandle is a read-only HWND property which contains the handle for the form instance used as the main form in the application.

The value for the property is derived using the OnGetMainFormHandle event handler (when assigned) or a TGetHandleEvent handler assigned in the application. When neither of these mechanisms provides a value other than zero (0), the window handle assigned in the MainForm property is used.

MainFormHandle is used in the implementation of methods in WidgetSet classes, primarily for the Windows platform, and in custom-drawn controls.

Controls whether a button is displayed on the task bar for the main form in the application.

MainFormOnTaskBar is a Boolean property which determines whether the icon for the main form in the application is displayed on the task bar. When MainFormOnTaskBar is set to True, a button representing the main form is displayed on the task bar area in the window manager. When set to False, the button is not displayed in the task bar area.

Changing the value in the property causes the Widgetset class to be notified of the new property value.

MainFormOnTaskBar is a platform-dependent property. It may not be implemented for all platforms supported for the Lazarus application. In addition, some platforms which display task bar thumbnails (like Windows Vista) may require the property to be set to True.

The default value for the property is normally set in the Lazarus project file (.lpr) used to compile the application.

The number of modal forms shown.

ModalLevel is a read-only Integer property with the number of forms displayed modally in the application.

The value in ModalLevel is incremented in the ModalStarted method. It causes the OnModalBegin event handler and application handlers for the ahtModalBegin handler type to be signalled (when assigned) when its value is 1 following the increment.

The value in ModalLevel is decremented in the ModalFinished method. It causes the OnModalEnd event handler and application handlers for the ahtModalEnd handler type to be signalled (when assigned) when its value is 0 following the decrement.

TMethodList.CallNotifyEvents
Indicates if an active control is focused when a form receives focus.

MoveFormFocusToChildren is a Boolean property which indicates if an active control is focused when a form receives focus in the application.

The default value is True. When set to False, the window or form will still receive focus, but a child control is not selected.

Used in the SetActive method in TCustomForm.

The control currently under the mouse.

Used to detect when the mouse enters and leaves a control.

Indicates how forms are represented in the task bar.

TaskBarBehavior is a TTaskBarBehavior property which indicates how forms in the application are represented in the task bar. The property value is used in conjunction with the ShowInTaskBar property for the TCustomForm instances in the application. For example:

tbDefault
  Shows task bar buttons according to the default behavior for the platform.
tbMultiButton
  Shows a task bar button for each form with stDefault in its ShowInTaskBar property.
tbSingleButton
  Hide buttons for Forms with stDefault in its ShowInTaskBar property.

When the property value is changed, the UpdateShowInTaskBar for each TCustomForm instance is called when its ShowInTaskBar property is stDefault.

Indicates if application format settings are updated when changed in a widgetset class.

UpdateFormatSettings is a platform-specific Boolean property which indicates if application format settings are updated when changed in a widgetset class. The default value for the property is True, as assigned in the Create constructor.

The property value is used in the IntfSettingsChange method to determine if the GetFormatSettings or GetFormatSettingsUTF8 method is called for the Windows platform. GetFormatSettings is called when DisableUTF8RTL is defined for the compiler. Other platforms are not affected, and do not call either method.

Default handler for unhandled Actions.

OnActionExecute is a TActionEvent property with the event handler signalled (when assigned) from the ExecuteAction method.

The AAction argument contains the TBasicAction instance executed in the event handler. Handled indicates whether the action was executed in the event handler. Set Handled to False if the action was not executed.

TActionEvent TBasicAction
Event handler signalled to update actions used in the application.

OnActionUpdate is a TActionEvent property with the event handler signalled to update actions used in the application. OnActionUpdate is signalled from the UpdateAction method called when the CM_UPDATEACTIONS control message is handled in the application.

Event handler signalled when an Activate message is handled in the application.

OnActivate is a TNotifyEvent property with the event handler signalled when an Activate message is handled for the application.

OnActivate is signalled from the NotifyActivateHandler method, which occurs when the Activate method is called for the application. The event handler is also signalled (via Activate) from the WMActivate method in TCustomForm to ensure that the application is activated before one of its forms is updated in the task bar.

Use the OnDeactivate event handler to perform actions needed when the main form in an application is de-activated.

Use the TApplicationProperties class to assign properties and event handlers at design-time that are applied to the application instance at run-time.

Event handler signalled when a Deactivate message is handled in the application.

OnDeactivate is a TNotifyEvent property with the event handler signalled when a Deactivate message is handled in the application.

It is signalled from the NotifyDeactivateHandler method, and occurs when the Deactivate method is called for the application. The event handler is also signalled (via Deactivate) from the WMActivate method in TCustomForm to ensure that the application is de-activated when its main form is de-activated.

Use the OnActivate event handler to perform actions needed when the application is activated.

Use the TApplicationProperties class to assign properties and event handlers at design-time that are applied to the application instance at run-time.

Event handler used to provide a value for the MainFormHandle property.

Used in the implementation of the GetMainFormHandle method. Provides the first opportunity to set the value for MainFormHandle before calling the other handlers added to the application.

Event handler signalled when the application enters the idle state.

OnIdle is a TIdleEvent property with the event handler signalled when the application enters the idle state. Assign an object procedure to the event handler to perform actions needed when other window or control messages are not present.

It is signalled from the Idle method, and occurs after released components and asynchronous callbacks have been processed for the application. It occurs before the NotifyIdleHandler method is called to process other application handlers using the ahtIdle type.

Any actions performed in the event handler should have a short duration, and relatively low resource requirements. This will ensure that system performance is not adversely affected, and the application is responsive.

Use OnIdleEnd to perform actions needed when the application leaves the idle state.

Use the TApplicationProperties class to assign properties and event handlers for an application instance at design-time that are applied at run-time.

Event handler signalled when the application leaves the Idle state.

OnIdleEnd is a TNotifyEvent property with the event handler signalled when the application leaves the Idle state.

It is signalled from the DoOnIdleEnd method, and occurs after the AppWaitMessage method in the widgetset class has been completed. It occurs before the NotifyIdleEndHandler method is called to process other application handlers using the ahtIdleEnd type.

Use OnIdle to perform actions needed when the application enters the idle state.

Use the TApplicationProperties class to assign properties and event handlers for an application instance at design-time that are applied at run-time.

Event handler signalled when a session is ended in the application.

OnEndSession is a TNotifyEvent property with the event handler signalled when a session is ended in the application. It is called from the IntfEndSession method, and occurs when the WM_ENDSESSION message is handled in the widget class. It is signalled before other application handlers using the ahtEndSession type.

OnEndSession may not work reliably on all platforms supported supported for Lazarus. Some environments / window managers do not post a WM_ENDSESSION message when the process is killed.
This event handler can deny to end the session.
Event handler signalled when the application is minimized.

OnMinimize is a TNotifyEvent property with the event handler signalled when the application has been minimized (iconified in GTK terminology). The application is minimized when its main form is also minimized.

OnMinimize is signalled when the IntfAppMinimize method is called by the widgetset class, and occurs before other application handlers using the ahtMinimize type are notified.

Use OnRestore to perform actions when the main form is restored from its minimized state.

Event handler signalled when a message dialog in the application has been completed.
Used in the CustomDraw interface.
Event handler signalled a form in the application is displayed as a modal form.

OnModalBegin is a TNotifyEvent property with the event handler signalled when a form in the application is displayed as a modal form.

OnModalBegin is signalled from the ModalStarted method, which is called when the form instance calls its ShowModal method. It occurs only once - when the first modal form is displayed. Subsequent events are ignored in ModalStarted when a modal form is already active.

Use OnModalEnd to perform actions needed when the number of modal forms for the application reaches 0 (zero).

Event handler signalled when the last modal form for the application has been exited.

OnModalEnd is a TNotifyEvent property with the event handler signalled when the last modal form or dialog in the application has been exited.

It is signalled from the ModalFinished method if the number of modal forms in the application is 0 (zero). It is signalled prior to other application handlers using the ahtModalEnd handler type.

Use OnModalBegin to perform actions needed when the first modal form is displayed for the application.

TCommonDialog.Execute
Event handler signalled when the application is restored from a minimized / maximized state.

OnRestore is a TNotifyEvent property with the event handler signalled when the application is restored from a minimized / maximized state. It is signalled from the IntfAppRestore method, and occurs before other application handlers using the ahtRestore type are notified.

Use OnMinimize to respond to the notification when the application is minimized.

Event handler signalled when file(s) are dropped into the application.

OnDropFiles is a TDropFilesEvent property with the event handler signalled when one or more files are dropped onto a form in the application. It is signalled from the IntfDropFiles method, and occurs after the corresponding method for the form that is the drop target has been notified from the window processing loop.

Event handler signalled when help is requested in the application.

OnHelp is a THelpEvent property with the event handler signalled (if assigned) when help is requested in the application. It is signalled from the DoOnHelp method when the ActiveForm does not have an assigned OnHelp event handler or does not respond the specified help command. It occurs before other application handlers using the ahtHelp handler type are notified.

Event handler signalled when a hint is requested in the application.

OnHint is a TNotifyEvent property with the event handler signalled when the value for the Hint property has been changed in the application. It is signalled (when assigned) from the SetHint method, and occurs before other application handlers using the ahtHint handler type are notified.

Event handler signalled to determine if a keystroke message is a shortcut key in the application.

OnShortcut is a TShortcutEvent property with the event handler signalled to determine if a keystroke message is a shortcut (or accelerator) key in the application. It is signalled (when assigned) from the IsShortcut method, and occurs before the OnShortcut event handlers for other forms are checked.

This event handler can interpret keystrokes as shortcuts, before the normal target handles the key. The event handler can set its Handled argument to True when the Msg argument contains a shortcut keystroke specific to the application. This prevents the OnShortcut event handlers in the application forms from being notified.

Event handler signalled prior to displaying a hint window.

OnShowHint is a TShowHintEvent property with the event handler signalled prior to displaying a hint window for the application.

It is signalled (when assigned) from the ShowHintWindow method when ShowHint has been enabled in the application. It occurs after HintControl has been assigned to the hint window, and the position for the hint window relative to HintControl has been calculated. It occurs before other application handlers using the ahtShowHint type are notified, and the hint window is made visible and activated.

Event handler signalled to handle user input messages.

OnUserInput is a TOnUserInputEvent property with the event handler signalled when an input message is available in the processing loop for the widgetset class. It is signalled (when assigned) from the NotifyUserInputHandler method, and occurs before other application handlers using the ahtUserInput type are notififed.

Event handler signalled when the application is freed.

OnDestroy is signalled from the Destroy destructor prior to freeing resources allocated in the application class instance. It provides the first opportunity to respond to application shutdown after Flags has been updated to include the AppDestroying enumeration value.

Event handler signalled when a circular exception occurs before the application is halted.

OnCircularException is a TExceptionEvent property with the event handler signalled when a circular exception occurs in an application. It is signalled from the HandleException method when another Exception occurs within the exception handler.

Allows the platform defaults for glyphs on buttons to be overridden.

Some platforms always show glyphs on buttons, while others do not.

Sets the default policy for showing or hiding glyph images in menus.
TGlyphShowMode
Indicates if Hints are displayed for the application.

ShowHint is a Boolean property which indicates if Hints are displayed for the application. It is used when tracking the position of the mouse cursor over controls and forms, and determines if the items require a hint display.

Setting the value in ShowHints to False causes an existing THintWindow instance in the application to be freed.

Allows the main form to be shown or hidden when an application is started.

Allows the main form to be shown or hidden when an application is started. The default value for the property is True as assigned in the Create constructor.

The property value is updated at run-time when a new value is assigned to the ShowMainFrom property in TApplicationProperties.

ShowMainForm is used in the Run method to determine if the Show method is called for an assigned MainForm instance. The form is displayed prior to calling the AppRun method in the widgetset class.

Contains the title for the application.

The read and write access specifiers for the property are overridden in TApplication. Read access ensures that an empty title defaults to the file name (without path information) for the application executable file. Write access ensures that a new value for the property is applied to the widgetset class using its AppSetTitle method.

TCustomApplication.Title
Indicates if forms and controls in the application can be scaled to different display densities (Pixels per Inch).

Scaled is a Boolean property which indicates if the application can be scaled between differing display densities (Pixels per Inch) at run-time. The default value for the property is normally set in the project file used to compile the application and its forms and controls.

When Scaled is set to True, the application allows the design-time PixelsPerInch value to be adjusted to reflect the run-time value. Forms, frames, image lists, and other controls also have a Scaled property which determines if the feature is enabled for that particular class type. If Scaled is set to False in TApplication, the feature is disabled for all of the other class types. Scaled (at the application-level) is normally checked before the component- or control-level setting.

Contains the default BiDiMode value used for the current LCL version.

The default value is bdLeftToRight.

The default hint window background color.
The default pause before the hint window displays (in milliseconds).
The default Hint re-display pause (in milliseconds).
The default pause before hint is hidden (in milliseconds).
The default pause added to DefHintHidePause (in milliseconds).
A component that provides access to the properties for the current application.

TApplicationProperties is a non-visual component used to provide design-time settings that are applied at run-time to an application, including:

- CaptureExceptions
- HelpFile
- Hint
- HintColor
- HintHidePause
- HintPause
- HintShortCuts
- HintShortPause
- ShowButtonGlyphs
- ShowMenuGlyphs
- ShowHint
- ShowMainForm
- Title
- OnException
- OnGetMainFormHandle
- OnIdle
- OnIdleEnd
- OnEndSession
- OnQueryEndSession
- OnMinimize
- OnModalBegin
- OnModalEnd
- OnRestore
- OnDropFiles
- OnHelp
- OnHint
- OnShowHint
- OnUserInput

Values for the properties are assigned in the constructor using the currently assigned values in the Application singleton. The assignments can be maintained at design-time.

At run-time, changes to the properties are also assigned to the Application singleton. For event handler properties, the previous routine is removed as a handler and the new handler is added to the Application singleton. When the component is freed, the event handlers are removed from the Application singleton. The changed properties are not assigned to the Application singleton at design-time.

TApplicationProperties is available on the Additional tab in the Lazarus IDE Component Palette. TApplicationProperties is similar to the TApplicationEvents class in Delphi.

Sets the value for the ExceptionDialog property.
New value for the property.
Sets the value for the CaptureExceptions property.
New value for the property.
Sets the value for the HelpFile property.
New value for the property.
Sets the value for the Hint property.
New value for the property.
Sets the value for the HintColor property.
New value for the property.
Sets the value for the HintHidePause property.
New value for the property.
Sets the value for the HintPause property.
New value for the property.
Sets the value for the HintShortCuts property.
New value for the property.
Sets the value for the HintShortPause property.
New value for the property.
Sets the value for the ShowButtonGlyphs property.
New value for the property.
Sets the value for the ShowMenuGlyphs property.
New value for the property.
Sets the value for the ShowHint property.
New value for the property.
Sets the value for the ShowMainForm property.
New value for the property.
Sets the value for the Title property.
New value for the property.
Sets the value for the OnActivate property.
New value for the property.
Sets the value for the OnDeactivate property.
New value for the property.
Sets the value for the OnException property.
New value for the property.
Sets the value for the OnGetMainFormHandle property.
New value for the property.
Sets the value for the OnIdle property.
New value for the property.
Sets the value for the OnIdleEnd property.
New value for the property.
Sets the value for the OnEndSession property.
New value for the property.
Sets the value for the OnQueryEndSession property.
New value for the property.
Sets the value for the OnMinimize property.
New value for the property.
Sets the value for the OnModalBegin property.
New value for the property.
Sets the value for the OnModalEnd property.
New value for the property.
Sets the value for the OnRestore property.
New value for the property.
Sets the value for the OnDropFiles property.
New value for the property.
Sets the value for the OnHelp property.
New value for the property.
Sets the value for the OnHint property.
New value for the property.
Sets the value for the OnShowHint property.
New value for the property.
Sets the value for the OnUserInput property.
New value for the property.
Constructor for the class instance.

Create is the constructor for TApplicationProperties. Create calls the inherited Create method, and sets the defaults values when a new application is being designed, or loads local values for an existing application.

TComponent.Create
Owner of the class instance.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. Destroy ensures that event handlers in the class instance are removed from the handlers registered in the global TApplication instance.

Event handlers are not removed from the Application variable at design-time; they were not added at design-time either.

Destroy calls the inherited destructor prior to exiting from the method.

Indicates the dialog type displayed for an exception.
The default value is aedOkCancelDialog.
Contains the name for the help file in an application.

HelpFile is a String property with the name of the help file for an application. It is read from or written to the HelpFile property in the Application singleton. Changing the value for the property at run-time causes the Application instance to be updated.

Event handler signalled to handle an exception in an application.

OnException is a TExceptionEvent property with an event handler signalled to handle an exception in an application. Its value is assigned to the OnException property in the Application singleton at run-time.

Changing the value for the property at run-time causes the Application singleton to be updated.

TCustomApplication.OnException
The abstract base class for visual Form designers.

TIDesigner is a TObject descendant which specifies the interface used for visual Form designers . TIDesigner is the type used for the TCustomForm.Designer property.

It is used as the ancestor for TComponentEditorDesigner, and the type expected in the RootDesigner for the Object Inspector and Property editors used in the Lazarus IDE.

IsDesignMsg
- receives a message from Sender, and returns True if it is a design message.
Method when design is Modified.
Notification
that the supplied Operation has been applied to the specified Component.
PaintGrid
- method for painting the grid in the designer.
ValidateRename
- method to validate the Rename process.
Gets the value for the shift state (whether Shift, Ctrl, or Alt key).
Shift, Ctrl, Alt modifier for the designer.
Method to select only the current component in the designer.
Returns a Unique name for the designer, using the BaseName as a starting point.
TFormPropertyStorage
- class for storage of a Form's properties.

TFormPropertyStorage is a TControlPropertyStorage descendant which extends the ancestor class to read and write form values. It provides additional methods called when a form is created, closed, or freed. TFormPropertyStorage is the base class for descendants like TCustomIniPropStorage, TCustomJSONPropStorage, and TCustomXMLPropStorage.

Calls the Restore method.
Converts modifier keys in the LParam of a mouse message to a TShiftState value.
TShiftState MK_SHIFT MK_CONTROL MK_LBUTTON MK_RBUTTON MK_MBUTTON MK_XBUTTON1 MK_XBUTTON2
The asynchronous keyboard state.
Converts modifier keys from the LParam keyboard message (WM_KEYUP for example) to a TShiftState.
TShiftState MK_SHIFT MK_CONTROL MK_LBUTTON MK_RBUTTON MK_MBUTTON MK_XBUTTON1 MK_XBUTTON2
Converts virtual key state codes to TShiftState values.

Calls GetKeyState to get the virtual key codes for the following:

- VK_SHIFT
- VK_CONTROL
- VK_MENU
- VK_LWIN
- VK_RWIN

The return value is a set type with the TShiftState values corresponding to the virtual key codes. It may be an empty set when none of the virtual keys are detected.

Converts a shift state into a key state value compatible with the key state of a Windows API LParam.

The return value is a PtrUInt type and contains an OR'ed combination of the following constants:

- MK_Shift
- MK_Control
- MK_LButton
- MK_RButton
- MK_MButton
- MK_XBUTTON1
- MK_XBUTTON2

TShiftState MK_SHIFT MK_CONTROL MK_LBUTTON MK_RBUTTON MK_MBUTTON MK_XBUTTON1 MK_XBUTTON2
Converts a TWindowState enumeration value to its String representation.

WindowStateToStr is a String function used to get the string representation for the TWindowState enumeration value in the State argument. Calls GetEnumName in lazutilities to get the String representation for the value in State.

GetEnumName
String representing the specified enumeration value.
TWindowState enumeration value converted in the routine.
Converts a string to a TWindowState enumeration value.

StrToWindowState is a TWindowState function used to get the value from the TWindowState enumeration for the specified string. StrToWindowState calls the GetEnumValueDef routine in lazutilities to convert the string to its value in the TWindowState enumeration. The return value defaults to wsNormal when Name does not represent a value in the TWindowState enumeration.

GetEnumValueDef
TWindowState value for the specified string, or wsNormal by default.
String representation for the window state enumeration value.
Formats various typed values into readable text.
The formatted value.
Pointer to focus state information for the last active control in an application.

Alias for the Pointer type. Used as the return value for the SaveFocusState function.

Returns the last focused control (focus state) in an application.

Returns the value from the LastFocusedControl variable in the implementation for the unit. The type used for the return value is TFocusState.

Last control which had focus in the application.
Restores the last focused control in an application to specified value.
Specifies an event handler signalled to get the form with the designer for a persistent object.

TGetDesignerFormEvent is an object function type which specifies an event handler signalled to get the form instance with the designer object for APersistent. The return value contains the TCustomForm instance which contains the designer object for the persistent object, and may be unassigned (Nil) if a form hosting APersistent cannot be located.

TGetDesignerFormEvent is the type used for the OnGetDesignerForm variable in the forms unit.

Specifies a Boolean function type used to implement the routine assigned to the IsFormDesign variable.
TIsFormDesignFunction is a Boolean function type used in the IsFormDesign variable.
Returns True when the form has csDesignInstance in its component state.
Event handler signalled to get the designer form for the specified form or control.

OnGetDesignerForm is a TGetDesignerFormEvent variable that contains the event handler signalled to get a form with a design surface for the specified form or control.

Address of the function used to determine if specified control is a form designer.
Gets the form instance for the specified Control.

GetParentForm is a TCustomForm function used to the form instance for the control specified in the Control argument.

Control is the TControl instance examined in the method. The Parent property is used to navigate to preceding parent controls until a TCustomForm instance is found.

TopForm indicates if the top-most form instance in the hierarchy is needed. When set to False (the default), the first TCustomForm instance found in the control hierarchy is used. Otherwise, all Parent controls in the hierarchy are examined until a Parent control has not been assigned.

The return value can contain the value in Control if it is a TCustomForm descendant and no other form instances are used in the control hierarchy. This is Delphi compatible.

Form instance that is the parent for the specified control.
Control used to locate the parent form in the control hierarchy.
True if the top-most form instance in the control hierarchy is needed.
Gets the Form with the designer object for the specified control or persistent object.

GetDesignerForm is a TCustomForm function used to get the form instance with the designer object for the specified control or persistent object instance. The function is overloaded to allow use of a TControl or a TPersistent instance to locate the form.

The return value contains the top-most TCustomForm instance with a TIDesigner instance for the value in Control or APersistent. The return value is Nil when a form is not found which hosts the specified argument.

Form instance with the designer for the specified argument.
TControl instance used to locate the owner form.
TPersistent instance used to locate the owner form.
Does a recursive search for the first Parent of type TCustomForm.

GetFirstParentForm is a TCustomForm function used to find the first form instance in the Parents for the specified Control. GetFirstParentForm calls the GetParentForm routine to get the form instance used as the return value. The return value is Nil when Control has not been assigned, or a form is not found in GetParentForm.

GetFirstParentForm is called from the IntfGetDropFilesTarget method in TWinControl, and from routines which handle accelerator keys for widgetset classes.

The first custom form instance found by ascending the control hierarchy.
TControl instance where the search for a parent form is started.
Gets the top-most form which hosts the specified control docksite form instances.
Gets a valid parent form for the specified control.

ValidParentForm is a TCustomForm function used to get a valid parent form for the control specified in the Control argument. TopForm indicates if the return value should contain the absolute root ancestor in the ancestry tree. ValidParentForm calls GetParentForm to get the return value for the routine.

ValidParentForm raises an EInvalidOperation exception with the message in sParentRequired when a valid parent form is not found for the specified control.

Raises an EInvalidOperation exception with the message in sParentRequired when a valid parent form is not found for the specified control.
Form instance that is the parent form for the control.
Control examined in the routine.
True if all parent forms are located in the routine.
Gets the designer object for the specified persistent object (or its parent).

FindRootDesigner is a TIDesigner function used to get the root designer object for the specified persistent object instance. The TIDesigner instance is found on the Form where the object (or its parent) is hosted in the Lazarus IDE. The return value is Nil when a parent form for APersistent is not found.

TIDesigner instance for the object, or Nil when a parent form is not found.
Persistent object examined for a designer instance in the routine.
Gets the control which is the top-most TCustomDesignControl instance for the specified control, or Nil when not a TCustomDesignControl instance.
Ensures that a TCustomDesignControl instance is found for the specified control.

Calls GetParentDesignControl to get the return value for the function. Raises an EInvalidOperation exception if a TCustomDesignControl instance is not found for the specififed control.

Used in methods which perform scaling operations for TCustomForm or TControl instances.

Searches for the given virtual key, used as an accelerator.

An accelerator consists of an ampersand followed by the accelerator key. Duplicate ampersands are ignored; they denote a literal (displayed) ampersand character (&).

True when the key is used as an accelerator.
The virtual key (uppercase ASCII) to find.
The string to scan.
Invokes all application user input handlers.
The message to process.
Returns the short version of a Hint string.

A short Hint is separated from the long Hint by a '|' character. When no such character is found, the whole Hint is returned.

The short (or complete) Hint.
The string containing both a short and long Hint.
Returns the long version of a Hint string.
The TApplication singleton.

Application is a unit global variable with the TApplication instance representing the currently executing application. The value for the variable is assigned in the initialization section for the unit when the application is started. It is freed in the finalization section when the application is terminated.

Use the TApplicationProperties component to provide design-time configuration settings for properties (including event handlers) which are automatically applied to Application at run-time.

The TScreen singleton for the application.
Variable representing the current exception object in an application.

Used in the implementation of the TApplication.HandleException method.

The class type used to create hint window instances for an application.
When True every form must have a resource (e.g. a .res file). An exception is raised if the resource is missing when creating a form.

The form resource is the .lfm file compiled into the executable of your application. For this flag, it does not matter if it was compiled via an .lrs file or via fpcres. The resource is automatically loaded by TForm and its descendants when created using the Create(Owner) method.

If the resource file is missing, there is something wrong with either a resource or the unit which contains the faulty form. If the flag is False, you will see a blank form and probably search a long time what is wrong. If you set this flag to True, you get an exception.

For creating forms without resources, you have 3 options:

- Create a TForm class (not a descendant).
- Construct your form using the CreateNew() constructor.
- It is also possible to disable the exception by setting the global variable RequireDerivedFormResource to False.

History: Before 0.9.31 there was no exception. Therefore some resource-less forms might use the standard constructor Create(Owner) and will now get exceptions. This change is Delphi compatible and compatible with TFrame and TDataModule components.

The type used for the MessageBox variable.

TMessageBoxFunction is an Integer function type which specifies the routine used to perform a message box or dialog.

Arguments passed to the function identify the content for the message dialog, including:

- Text displayed in the message dialog
- Title used on dialog form
- Flag values that control the buttons and icon for the dialog

The return value contains the modal result returned from the message dialog.

Provides the routine used to display a message dialog in widgetset implementations.

Normally contains a reference to the DefaultMessageBox function. It may have another function reference assigned to the variable in specific widgetset implementations (such as CustomDraw controls).

DefaultMessageBox
Maps form border styles to their border icons.

DefaultBorderIcons is an array constant with TBorderIcons values indicating the icons available for the various form border styles. Values in the array are indexed by the enumeration values in TFormBorderStyle. Each element in the array contains zero (0) or more values from the TBorderIcon enumeration, and indicates that the icon is used for the form border style.

DefaultBorderIcons contains the following values for the corresponding TFormBorderStyle values:

bsNone
  An empty set ([])
bsSingle
  [biSystemMenu, biMinimize]
bsSizeable
  [biSystemMenu, biMinimize, biMaximize]
bsDialog
  [biSystemMenu]
bsToolWindow
  [biSystemMenu, biMinimize]
bsSizeToolWin
  [biSystemMenu, biMinimize, biMaximize]

DefaultBorderIcons is used in the implementation of the SetFormBorderStyle method in TCustomForm.

Creates the widgetset singleton.

CreateWidgetset is a procedure used to create the WidgetSet singleton. CreateWidgetset executes the initialization handlers for the LCL interface.

AWidgetsetClass is the TWidgetsetClass class type used to create the WidgetSet singleton. CreateWidgetset is called from the interfaces.pp unit for a specific widgetset implementation (win32, gtk, gtk2, gtk3, qt, qt5, et. al.).

TWidgetsetClass class type for the desired widgetset implementation.
Destroys singletons for the Screen, Application, and WidgetSet.

FreeWidgetSet is a procedure used to free resources allocated to the Screen, Application, Clipboards, and WidgetSet singletons.

For Screen, allocated cursors and monitors are destroyed. Application is freed, and set to Nil. All clipboard formats are freed as well. The WidgetSet singleton is freed, and set to Nil.

FreeWidgetSet executes the CallInterfaceFinalizationHandlers routine to perform any finalization handlers installed for the LCL interface.

CallInterfaceFinalizationHandlers
Registers components declared in this unit.

Register is a procedure used to register components declared in the forms.pp unit for use in the Lazarus IDE. The following components are added to the component palette in the Lazarus IDE:

Standard Tab

- TFrame

Additional Tab

- TScrollBox
- TApplicationProperties