Contains definitions and descriptions for constructing the Forms which are the basis of the Lazarus Graphical User Interface The type of a procedure that takes no arguments. The type of a method that takes no arguments. Represents the Position and Size of a Form on Screen.

poDesigned - The Form appears exactly as it is positioned and sized in the Form Designer

poDefault - The window manager decides how the form is to appear, in a default position and size

poDefaultPosOnly - keeps the Designed size, but position determined by windowmanager

poDefaultSizeOnly - keeps the Designed position, but size determined by windowmanager

poScreenCenter - Centers the form on screen

poDeskTopCenter - Centers the form on desktop

poMainFormCenter - Centers the Form on the Main Form

poOwnerFormCenter - Centers the Form on Owner form

poWorkAreaCenter - Centers the Form on working area

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 windowmanager. Keeps the designed form position, but size determined by windowmanager. 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 this 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 http://wiki.lazarus.freepascal.org/Windows_CE_Development_Notes#Positioning_and_size_of_Dialogs_and_Forms

Android - In this platform windows are always fullscreen.

The valid values for this enumerated type are:

wsNormal - The window appears normal

wsMinimized - The window is minimized and is not shown in the screen, but only in the taskbar

wsMaximized - The window appears maximized

wsFullScreen - The window appears in full screen mode, as much as allowed by the platform.

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. to the full monitor? The window appears in full screen mode, as much as 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. Action taken when a new value is assigned to , and no OnHint handler is available. !? The new Hint text. The orientation of a ScrollBar. Horizontal scrollbar. Vertical scrollbar. The range of scrollbar increments. Scrollbar style flags. Default what's this? Scrollbar appears flat Scrollbar sends HotTrack messages ? Class for exception in . Type of a scrollbar in a .

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

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 scrollbars. 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.

Scrollbars usually appear only when Range is higher than Page, i.e. when not the entire content can be shown at the same time. See the ScrollBar property of the scrolling control for details.

?
The virtual scroll range (FRange - ClientSize), at least zero (never negative). The associated . The Handle of the associated . The AutoScroll state of the associated . True when the associated has a handle allocated. Determines the Range, based on the physical and virtual size of the associated control. Notifies the associated Control of changes. Checks and propagates the new range to the Control. Handler for the ScrollBar (movement) messages. updates the scroll bar (position, etc) usage? render scroll information non-valid usage? Get the horizontal scrollbar of Control. Get the vertical scrollbar of Control. Determines whether a scrollbar is required. True when Visible and Range higher than Page. Creates a scrollbar object for AControl. TObject.Create The windowed control in which the scroll bar is found. The scrollbar 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 Determines the current widget state. True if scrollbar is visible. The scroll Position, zero if not Visible. The scroll Position, zero if not Visible. Get the ScrollBar of the opposite direction (horz/vert). The currently remaining extent of the Parent Control, depending on ScrollBar visibility. return for vertical scrollbar the clientwidth for vertical scrollbar the clientwidth The remaining extent of the Parent Control, when the ScrollBar is visible. return for vertical scrollbar the clientwidth with the bar, even if Visible=false for vertical scrollbar the clientwidth with the bar, even if Visible=false The remaining extent of the Parent Control, when the ScrollBar is not visible. return for vertical scrollbar the clientwidth without the bar, even if Visible=true for vertical scrollbar the clientwidth without the bar, even if Visible=true The small Position increment, applicable to the scrollbar arrows. The amount by which the Position moves if the triangle at either end of the bar is selected.
Default is 8 (pixels).
The orientation: horizontal or vertical. The slider size, Position increment applicable to the scrollbar 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.
Default is 80 (pixels).
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. Enables smooth scrolling, with automatic adjustment of Increment and Page. Smooth scrolling uses an Increment of 10% and a Page size of 90% of the visible client area ? The virtual size of the Parent Control. 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. Gives feedback while the slider is dragged. When it takes an significant amount of time, to repaint the parent control at a new position, Tracking should be False to prevent flicker; then the control is updated only when the slider is released. Definitely hides the scrollbar when False (default True).

The scrollbar 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. Prevents recursive updates, True while an update is already in progress. Also calculates sizes for the scrollbars if required. TWinControl.AlignControls The virtual origin of the physical client area. TControl.GetClientScrollOffset The ScrollBar Positions, or (0,0) if no scrollbars in use. Returns the full virtual ClientRect. TControl.GetLogicalClientRect Also updates scrollbars if needed. TControl.DoOnResize Delegates scroll messages to the horizontal ScrollBar. Delegates scroll messages to the vertical ScrollBar. Updates Page, AutoRange, IsScrollBarVisible, returns True on changes. True when something changed. Tells the widget to scroll the client area, in the given direction. The direction to scroll. The previous scroll Position, needed to calculate the relative scroll amount. Also initializes the scroll bars. TWinControl.Loaded Initializes or updates the ScrollBars. Ignores recursive calls. Tells the widget to scroll the client area relative. The still visible part doesn't deserve a repaint (optimization). Allows to show ScrollBars only if needed (when True). The horizontal scroll bar (LCL control). The vertical scroll bar (LCL control). A windowed control with scroll bars. The base type for TFrame. Frames can be designed like Forms and used like custom controls, without much coding or installation in the IDE. Invokes Proc for all Controls and also for all Components with no Parent. TComponent.GetChildren TWinControl.GetChildren The callback method. Components are enumerated only if Root=Self. Also handles add/remove of ActionLists. TComponent.Notification TControl.Notification Also updates the ActionLists. TControl.SetParent Frames can be designed like Forms and used like custom controls, without much coding or installation in the IDE. Visual elements in window title bars - depending 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 - on the full desktop
  • 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.
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 states are:

fsCreating,  // initializing (form streaming)
    fsVisible,   // form should be shown
    fsShowing,
    fsModal,     // form is modal
    fsCreatedMDIChild,
    fsBorderStyleChanged,
    fsFormStyleChanged,
    fsFirstShow,  // form is shown for the first time
    fsDisableAutoSize  
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 autosize 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...). 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. platform? Always show the form in the TaskBar. Never show the form in the TaskBar. Defines the parent handling for forms and dialogs. ? modal: popup to active form or if not available, to 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 explicitely pmAuto before calling ShowModal. modal & non-modal: popup to active form or if not available, to main form modal & non-modal: popup to PopupParent or if not available, to main form Type of an form OnClose handler.

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 action.

The form that received an Close request. Set this to caNone, to prevent the form from closing. Type of an form OnCloseQuery handler. The form that received an Close request. Set to False to deny closing ? Type of an OnHelp event handler. False means: use the default procedure ? ? ? False means: do not show any help. Type of an OnDropFiles event handler. The control that received the dropped files ? The list of the dropped files ? Type of 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. The base type for TForm. FActionLists - local variable holding lists of actions asociated with the Form The Handle of the big form icon ? Lists of installed Notification handlers ? ? Used to detect Focus changes (Enter/Exit events) ? ? The taskbar representation of the form, as set in the widgetset. The Handle of the small form icon ? Tries to resolve ShowInTaskBar=stDefault according to Application settings. Whether Form properties should be stored in the stream. ? Closes a modal form ? Destroys the form icons ? Loads the new form icons, notifies the widgetset and all forms. Remembers the last focused control. Called when the Focus changed ? what does Result=0 mean? Adds an form notification handler. Removes an form notification handler. Returns the first control in Tab order. Called when the main menu changed. Don't show a main menu for dialog forms, i.e. when BorderStyle=bsDialog (delphi compatible). Notifies the widgetset of the change. When no control is Active, sets the Focus to the first control in TabOrder. Notifies the OnActivate handler. Does nothing. ? Excludes borders from the given rectangle. TWinControl.AdjustClientRect Locks form updates (AutoSize), until EndFormUpdate. Nested calls are allowed (pairs of Begin/EndFormUpdate). Creates the widget, updates the widget-dependent properties. TWinControl.CreateWnd TScrollingWinControl.CreateWnd Called when the form looses the focus. Notifies the OnDeactivate handler. Notifies the form close handlers. Notifies the form create handlers. Notifies the OnDestroy handler. Notifies the OnHide handler. Notifies the OnShow handler. Unlocks form updates, in sync with BeginFormUpdate. When the update counter reaches zero, FormEndUpdated is invoked to realize the pending changes. Invokes Proc for all Controls and also for all Components with no Parent. TComponent.GetChildren TWinControl.GetChildren The callback method. Components are enumerated only if Root=Self. 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. 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. Also renews ActiveControl and Visible. TComponent.Loaded TScrollingWinControl.Loaded Called after all child control handles are created. When this is a top level form (Parent=Nil) also invokes ParentFormHandleInitialized. TWinControl.ChildHandlesCreated Calls the user Paint handler. Calls the user Alignment handler (AlignControls). Here: Nop for a top-level form. Here: clip width and height of a top-level form to the monitor WorkArea. Here: Moves a top-level form in front or back of all forms. True for BringToFront. Moves the form to the initial Position. Called when the widget's visibility (Showing) changed. Updates (and realizes?) all properties affecting the visual representation. TWinControl.UpdateShowing If the the form is about to show, calculate its metrics. Notifies the FirstShow handlers. ? Notifies all VisibleChanging handlers. Notifies all VisibleChanged handlers. Handled messages include: Activate, SetFocus. KillFocus; Exit, Enter; Window Position Changing; DrawItem Adds another ActionList. Removes an ActionList. Checked BeginDrag. allow form dragging only if it is docked into a site without DockManager why? Here: returns the Caption. Handler for ActionExecute messages. Handler for ActionUpdate messages. 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 to initiate their actions ? Creates a form without a resource. Here: ignored purpose? The Handle of the big form icon. Close 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 deny to close the form.

Asks the OnCloseQuery handler whether the form can close. Updates ActiveControl if it is to be defocused. The control that looses the focus. True when the control is removed. Ensure that this form is fully visible, optionally brings it in front of all forms. Bring the form to front if True. Focus the control. If needed bring form to front. If the control or one of its parents is not visible or disabled an exception will be raised (in SetFocus). when? always? The control receiving the focus. Makes a Bitmap image from the Form. The role(s) of the control in a modal form (default or cancel button). Invokes the OnDropFiles handler of the form. This function is called by the interface. The drop files event will be invoked when the user drops one or multiple dragged files on one of application's forms. First this event should be fired for target form (or main form if drop target is unknown), then for the application. Show help for control or menu item. This function is called by the interface. Asks all applicable components to interpret an keystroke as an shortcut. True, the specified Key and Message are active as a shortcut True when the specified Key was handled as a shortcut. Extends or shrinks the form to a monitor. The monitor to use, Nil means the designed monitor. If True then extend to the WorkArea of the monitor, else clip the form to the monitor bounds. Returns true if AutoSize should be skipped / delayed because of a missing handle. propagate back into TControl? Marks the form for destruction. True when the form can receive the focus. Handles focus switch to a control (enter/exit messages). False when no switching allowed ? The control that received the focus ? Sets the bounds defining the restored control. Temporarily goes to normal (restored) window state, if required. Show this form as a modal Dialog. Shows the form in modal state and waits til it is closed by the user or by the program. Modal state means that neither the user nor the program can switch to forms, that were already visible before ShowModal. The form must have Visible=false when calling ShowModal. The call doesn't return until the form is closed. The application switches to modal state until then. ShowModal creates its own event loop calling ProcessMessages. EInvalidOperation if the form cannot be shown modally. The modal result of the dialog. Shows this form in front of all other forms. Returns (eventually creates) the Handle of the small Form or Application Icon. ? Here: always False. Adds an handler for the first Show of the form. Removes an handler for the first Show of the form. Adds an handler for form Close. Removes an handler for form Close. Adds an handler for form Create. Removes an handler for form Create. Returns the currently active MDI child form. Valid result is returned only when FormStyle = 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. Is true when the form has the focus. Use active to check if the form has the focus Specifies the active control on the form. Use this to get or set the active control on this form. Specifies the Default control on the Form. The Default control reacts on the Enter key pressed. Specifies whether files can be dropped onto this form. Allows this form to receive OnDropFiles event, when files are dropped on form via drag-and-drop operation. Allows for a translucent form. somewhat transparent? How translucent the form is (0=transparent, 255=opaque). Specifies which icons appear in the title bar of the form. The icons can represent a system menu, minimize/restore/maximize and close buttons, and an What's this button. The border style affects the title bar, border and resize behaviour 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 When the form is put into another control the window borders depend on the widgetset. There are no borders under gtk.

The control associated with the Cancel action.

Determines the control associated with the Cancel action (exit 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 appearing in the title bar. The Handle of the MDIForm client (container for mdi children). The form's background color. The control associated with the default action for this form. This is typically a button such as 'Accept' which is highlighted in some way on-screen to indicate that this is the default action, and is selected either by hitting 'Return' or 'Enter' or by selecting that control with the mouse. The monitor type on which the form shall appear. The designer object when the form is in design state. Various state flags. Determines the Style of the form (MDI, splash...). The name of the help file for this form. The Icon associated with this Form (in minimized state). Allows the form to intercept keystrokes in child controls. Indexed access to MDI child forms, when this is an MDI form. The main menu for this form. Drop a TMainMenu on the form to store it here and to show it on the form.
Specifies the return value of a modal form (dialog). The Monitor on which the form is shown. 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 of the same application to this window.

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

TApplication.OnActivate
Handler called when the form is closed. It determines what happens to the form (destroy, hide...). Handler called before the form is closed. It can reject an close request. An OnCloseQuery handler can check for unsaved information, ask the user whether it's okay to save or discard changes, or simply reject the close request. Handler called when the form has been created. Handler called when the form is deactivated (lost focus). Handler called when the form is destroyed. Handler called when files have been dropped. You enable this feature by setting AllowDropFiles property. Handler called when Help is requested. Handler called when the form is being hidden. Handler called when a key is pressed, before further handling of the key. The handler can interpret the key as an shortcut and act accordingly. Handler called when the form becomes visible. Handler called when the form is minimized, maximized or restored. The logical scaling of the form font? used where? Defines where popup menus are shown ??? ? The initial placement of the form. By default it is in the position that it was placed in the Form Designer The height of the form when it is restored (ie changes from minimised or maximised). The position of the left edge of the form when it is restored (ie changes from minimised or maximised). The position of the top edge of the form when it is restored (ie changes from minimised or maximised). The width of the form when it is restored (ie changes from minimised or maximised). How the form is represented in the system Task Bar. Whether the form is currently minimized, maximized or normal (restored). Default is 'normal' (ie not minimized nor maximized) Arranges MDI child forms so they overlap. 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. The version of the LCL as string. Used to distinguish form streams of different versions. Class of TForm A floating DockSite, usable to make TControls float. Makes the client occupy the entire client area (alClient). Closes (releases) the form after the last client has been undocked. 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. The popup box containing helpful information that appears when the mouse pointer hovers over an object.

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. Collect the flags for the formatting of the text. Called when the hint timer expires. Hides the window. Treats the whole window as transparent. ? Shows the hint. Extended version of ActivateHint. Override this method to make use of the additional data. Determines the rectangle required for the hint display, based on the maximum text/window width. Greater zero, else the full monitor width is used. Destroys the widget. The intended text alignment. See DrawText link? Does the hint disappear (get hidden) after a while? If AutoHide is TRUE, the hint disappears afer an interval specified by HideInterval. The time after which the displayed hint disappears. Class of THintWindow. Information about an phyiscal monitor. All informations are retrieved dynamically from the OS, so that all changes are taken into account. Retrieves monitor information from the OS. The logical dimensions of the monitor, within the desktop. Identifies this monitor to the system. The height of the display. The leftmost screen coordinate of the display. Index of the monitor in the list. True if this is the primary monitor of the system. The topmost screen coordinate of the display. The width of the display. The usable display area, excluding a taskbar etc. A list of all available monitors. List notification handler, destroys the Monitor object on removal from the list. The monitor object. The list operation. The indexed list of all Monitors. An element of the Cursor list. The next list element. The list index. The OS identifier for this cursor. Type of an screen notification handler, for form related events. ? The Screen ? The affected form. Type of an screen notification handler, for control related events. ? The Screen ? 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 choose when screen coordinates are out of the screen bounds. Default to the nearest monitor. Default to Nil (no suggested monitor). Default to the primary monitor. Provides information about the display and related objects.

The virtual screen (desktop) can include multiple physical Monitors.

Screen objects are Cursors, Fonts and Forms. For Delphi compatibility also (invisible) DataModules are listed.

The currently active Form, Control and Cursor also are tracked.

?
? The last active control, used to detect focus changes. The last active form, used to detect focus changes. ? Removes an cursor from Cursors[]. The logical cursor ID. Deletes the Cursors list. Clears the Monitors list. The logical cursor ID. Internal notification handler, adds a new form to the lists. Internal notification handler, removes the form from the lists. Remembers the currently active form and control as last active. Notifies all registered handlers of eventual changes. Builds the list of available monitors. Moves the Focus back to the previously focused control. Adds an notification handler. The notification (event) type. The notification handler. Add the handler as the first (True) or last (False) handler. Removes an notification handler. The notification (event) type. The notification handler. Adds the DataModule to the list. Removes the DataModule from the list. Notifies all registered handlers for the given event. The event type. The related form. Returns the CustomForms[] Index of the form. The form Index, -1 if not found. The Form to which the Index refers. Returns the Forms[] Index of the form. The form Index, -1 if not found. The Form to which the Index refers. The index of the form in the Z dimension (Front to Back). The index reflects the activation order of the forms, with the currently active form at index zero. Moves the form to the front of all form lists. GDB exception when the form is (being) destroyed, or the application is shutting down. Moves the form to the front of the Z-order list (notification only). GDB exception when the form is (being) destroyed, or the application is shutting down. Returns the topmost Modal form (ie a form that is awaiting a user response). The modal form, or Nil if none is active. Returns the index of the tompost modal form in CustomFormsZOrdered[]. The index, or -1 if no modal form is active. Checks whether the form is visible and either modal or not blocked by another modal form. ? Finds the named form, excluding designer forms. Finds a form by its name. Finds the named DataModule, excluding designer modules. Finds the named DataModule. Updates the property. Adds an notification handler. Removes an notification handler. Adds an notification handler. Removes an notification handler. Adds an notification handler. Removes an notification handler. Adds an notification handler. Removes an notification handler. Adds an notification handler. Removes an notification handler. Disable all forms except SkipForm.

Used to show modal forms or dialogs.

The enabled state is determined from the widget, not from LCL properties.

If DisabledList is Nil, a new list is created. Then all disabled forms are added to that list.

When the modal form returns, call EnableForms to restore all forms.

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. Use this method to restore all previously disabled forms. The list containing the forms to enable. The list is destroyed on exit. Find the monitor containing the given screen coordinates. The monitor found. The screen coordinates to find. What to return when no monitor was found. Find the monitor containing (most of) the given screen coordinates. The monitor found. The screen coordinates to find. What to return when no monitor was found. Find the monitor containing (most of) the given window. The monitor found. The window handle to use. What to return when no monitor was found. The control which has the Focus. The custom form which has the Focus. The form which has the Focus. The current mouse cursor shape. Use one of the predefined cursor styles, e.g. crHourGlass. The indexed list of available cursor shapes. The number of Custom Forms. The indexed list of Custom Forms. The list of Custom Forms, indexed by Z-order (zero is topmost). CustomFormZOrderCount - the number of forms arranged in Z-plane order (ie Front to Back) The number of existing data modules. The indexed list of Data Modules. The total vertical size of the desktop. The leftmost coordinate of the desktop. The total extent of the desktop, spanning all monitors. The topmost coordinate of the desktop. The total horizontal size of the display. The form that holds Focus really?what's different from ActiveForm? The names of the available (installed) fonts. The number of existing Forms. The indexed list of all Forms, in Z-order. The height of the primary monitor. The font used to display Hints. The Icon font, used with desktop icons. ? The font used in menus. The number of available Monitors. The indexed list of available monitors. Handler for a Focus changed notification. Handler for a Focus changed notification. The number of screen pixels for an virtual inch (DPI), in vertical direction. The display uses virtual inches, which typically are bigger than physical inches. This requires that text appears bigger on an screen than e.g. on an printer. The primary monitor typically shows the taskbar. ? The width of the primary monitor. The usable height of the primary monitor. The usable left coordinate on the primary monitor. The usable display area on the primary monitor, excluding e.g. the taskbar. The usable top coordinate on the primary monitor. The usable width of the primary monitor. The type of an handler. Set Cancel to True to prevent an logoff. ? ? Type of an Idle event handler. Lengthy operations should be broken into parts, to keep the application responsive. The handlers are called repeatedly, until all signal Done. Set to True when everything is done. when? The type of an asynchronous callback method. The argument passed to the method. ? ? The TApplication hint timer state. The hint timer is off. Waiting to show an hint ? Waiting to hide an hint ? Waiting to show the next hint ? when?what? ? Application state flags. In Idle state ? IdleEnd handlers have been notified ? In exception handling ? Suppress further exceptions or Panic on?? Application has the focus. Shutting down ? Skip asynchronous callbacks between handling messages ? Application has been initialized. Which keys can be used for the navigation within a form ? 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. Application becoming idle ? Application becoming busy ? 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 what's this? Handler invoked on handled exception. ? Handler invoked on session end what's this? 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 ? Handler invoked on F1 key (help request) purpose? Handler invoked on Hint request purpose? Handler invoked on Hint becoming visible purpose? Handler providing the Handle of the main form ?application/taskbar window?purpose?what's the purpose for *not* returning MainForm.Handle??? A queued asynchronous callback request node. A queued asynchronous callback request node. The callback method. The method call argument. The next list node. The preceding list node. superfluous, could be removed? The queue head for asynchronous callbacks. The first queued method. The last queued method. Management information for asynchronous callbacks.

Two queues are used:

New calls are added to the Next 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 of further 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. ? Describes the policy for the application of how to show menu and button glyphs

sbgAlways - show glyphs always (inspite of system preferences)

sbgNever - show glyphs never (inspite of system preferences)

sbgSystem - use system preferences for glyphs showing

on Button or Tab controls, and menus?
Show glyphs always. Show glyphs never. Show glyphs according to the platform default. How forms are represented in the TaskBar ? Show TaskBar buttons according to the platform default. Show buttons for Forms with ShowInTaskBar=stDefault. Hide buttons for Forms with ShowInTaskBar=stDefault. Application management and configuration for a GUI application.

Provides a message loop, hooks for application event handlers, and more.

Includes the useful function MessageBox, a simple dialog intended for displaying error messages, but also usable as an alternative to the various Message Dialogs.

Other project types have a different Application class

or no??
Holds the registered notification handlers. Queues for asynchronous calls. The Handle of the big application icon. The list of components which currently are released (destroyed). The list of components marked for release. ? The screen area of the current Hint window ? The timer for showing and hiding Hints ? The Hint time mode ? The current Hint window ? Counter for nested Idle locks, preventing execution of OnIdle handlers ? Cached key event parameter ? Cached key event parameter ? Cached key event parameter ? Cached mouse event parameter ? Cached mouse event parameter ? Cached mouse event parameter ? The previously installed exception handler ? The previously installed Exit procedure ? The list of all forms that should be restored to StayOnTop. The list is created in RemoveStayOnTop, processed in RestoreStayOnTop. The Handle of the small application icon. Notifies the OnIdleEnd handlers; called when the application exits Idle state. Searches for an HelpFile name in the active form, then in Application. Determines the main form handle, using all available handlers. When no Title was stored, extracts the program name from the commandline arguments. Destroys the application icons ? Loads the new application icons, notifies the widgetset and all forms. Handles mouse moving onto 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. Here: returns False, because this is a GUI application. False for a GUI application. Notifies all Idle handlers. True when all handlers are done, meaning: wait for next message. Notifies all Idle End handlers, when a new message arrived. Notifies all Activation handlers. Notifies all Deactivation handlers. Notifies all CustomForms of Msg arrived. The message to process. Nop, exists for Delphi compatibility only. Always False. OnHelp message handler. Tries OnHelp handlers of the active form, Application OnHelp and application Help handlers. 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. Starts the timer for display of a hint message. Asks the widgetset to update the TaskBar entries. ? Updates all Actions, hides splash screens. Hides the Hint window. Calls all methods queued by QueueAsyncCall. Ignored, should be zero. Destroys all components marked for release. Destroys all components. Returns the indexed commandline argument. The Owner object that invoked this instance of TApplication ? Finds the control under the mouse. Updates the LastMouse... info. The control, Nil if no control found. Clears all references to the destroyed control. The Handle of the large application Icon. The Handle of the small application Icon. Asks the widgetset to bring the application's form(s) to the front ? Creates a Form or component, owned by Application.

Note: The name is confusing and only kept for Delphi compatibility. It can actually create any kind of component.

Creates a Component instance of the given class, sets the pointer to the component variable.

If it is a form it will be added to the application's forms list.

A splash form is shown immediately.

and loads the component?If it is a form it will be added to the application's forms list.?
The component class. The variable receiving the new component reference. When MainForm is Nil, this form becomes the application MainForm. The form that may become the MainForm. 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. Safe destruction of a component, can be requested by the component itself. Unless the application is shutting down, all requests are queued. Queued requests are processed when the application is not currently processing a message. The component to destroy. Invokes the OnActionExecute handler. TComponent.ExecuteAction True when the Action was handled. The Action to execute. Invokes the OnActionUpdate handler. TComponent.UpdateAction 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 required to halt if an exception occurs, or invokes the appropriate handler.
It also writes details of the exception to the appropriate place for debugging.
TCustomApplication.HandleException
Handles all messages, then enters Idle state. Show help Currently relies on OnHelp handlers, CallHelp is not implemented. what? ? Show context sensitive help. Request handled ? Show help for a keyword. When Sender is a TControl, invoke its ShowHelp method. Should be a TControl, else nothing will happen. Remove StayOnTop from all forms. Builds a form list for use in RestoreStayOnTop. ? Restores StayOnTop for all forms changed by RemoveStayOnTop. ? True if the application is awaiting an event ? 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 ?exists for Delphi compatibility only? Initializes the widgetset (and more). TCustomApplication.Initialize Display an message dialog with several 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 Dialogs.

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 box.

Several constants are declared in the LCLType unit.

Add (better: OR) an icon constant and a buttons constant, for example
MB_ABORTRETRYIGNORE + MR_ICONQUESTION will cause 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 = MB_ICONEXCLAMATION
MB_ICONERROR = MB_ICONHAND
MB_ICONSTOP = MB_ICONHAND
MB_ICONINFORMATION = MB_ICONASTERISK

Asks the widgetset to minimize the application. Called when a form is shown modally. Invokes all OnModalBegin handlers when entering Modal state. Called when a modal form is closed. Invokes all OnModalEnd handlers when exiting Modal state. Restores the previously minimized application. Invokes the notification handlers. Special handling, here: Clears the reference to a removed component, terminates the application when the MainForm is removed. TComponent.Notification Call this method during lengthy operations, to keep the GUI responsive. Processes all waiting messages, then the queued asynchronous callbacks. Invoked when the application enters the idle state. Wait for next message? MainForm is loaded and control is passed to the event loop. Shows the exception message and asks the user to abort or continue. The exception to show. The application is terminated and the component engine is shutdown. Blocks Idle handling. Can be called moreoften, every call must be followed by EnableIdleHandler. what does this mean to application behaviour? Resume Idle handling. GDB exception when not previously disabled. Notifies all user input handlers of what? 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 by the interface when a theme option has changed. Checks the given language name for right-to-left reading. Checks the given language name for right-to-left reading. Uses arrow keys for navigation, if enabled. The control receiving the key. The virtual key; becomes VK_UNKNOWN when handled. The active modifier keys. 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. Uses the Tab key for navigation, if enabled. The control receiving the key. The virtual key; becomes VK_UNKNOWN when handled. True if the application has the focus. The type of the application (ie 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. Enables searching for global components by name. ? Application state flags. The current Hint text.

A hint is a small pop-up mesage that appears briefly while the mouse hovers over a control.

It usually displays useful information about how to use an object or what data should be entered, etc

Several properties allow to customize the delay before a Hint is shown, after an mouse move, and how long it will stay visible.

The color of Hint windows. How long a Hint stays visible, after an mouse move. How much a keystroke extends the time a Hint stays visible (added to HintHidePause). The delay before a Hint is shown. Enables the display of keyboard shortcuts (e.g. on menu entries). not implemented? The pause before a different Hint is displayed. The icon associated with this application. The application terminates when this form is closed. This property is set when the first form is created via Application.CreateForm and it is not FormStyle=fsSplash. The Handle of the MainForm ? ? The number of modal forms shown. Tracks modal forms showing another form modally. The control currently under the mouse. Used to detect mouse entering and leaving a control. Allows to switch between controls by pressing keys.

These keys can be enabled for navigation:

  • 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.
?
Default handler for unhandled Actions ? Default handler for unhandled Action updates ? Event handler for activation of the application. Event handler for deactivation of the application. ? The default handler for dropped files ? Event handler for ending a session of the application or logoff? ? Event handler when help is requested. Event handler when a hint is requested. Event handler for application entering Idle state. Event handler for application leaving Idle state. Event handler for application minimized. Event handler for a modal form opened (application entering modal mode). Event handler for all modal forms closed (application exiting modal mode). This event handler can deny to end the session. Event handler for application restored (from minimized/maximized state). This event handler can interpret keystrokes as shortcuts, before the normal target handles the key. ? Event handler for showing an Hint. ? Allows to override the platform default for glyphs on buttons. Some platforms show glyphs on all buttons, others don't. Enables Hint display ? Allows to show or hide the main form, on application start. Default TRUE. Sets the default policy for showing or hiding glyph images in menus ? How forms are represented in the TaskBar. The default hint window color. The default pause before hint window displays (ms). The default Hint reshow pause. The default pause before hint is hidden (ms). The default pause added to DefHintHidePause (ms). A component that simplifies access to the properties of the current application.

TApplication Properties can be set as a local default set of properties to be used for any new instance of TApplication

????
Create - constructor for TApplicationProperties: calls inherited Create, then sets some defaults if new application is being designed, or loads local values from existing application TComponent.Create TLCLComponent.Create The abstract base class for visual Form Designers The whole description looks like guesswork :-(
It should become more informative.
?
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 GetShiftState - returns the value of the shift state (whether shifted, Cntl key, Alt key etc) SelectOnlyThisComponent - method to select only the currrent component in the designer UniqueName - returns a Unique name for the designer, using the BaseName as a starting point TFormPropertyStorage - class for storage of a Form's properties Converts modifier keys from the LParam of a mouse message to a TShiftState. The asynchronous keyboard state ? Converts modifier keys from the LParam of a keyboard message (WM_KEYUP for example) to a TShiftState ? ? Converts a shift state into a key state value compatible with the key state of a Windows API LParam The Keys value is of the type PtrUInt and is a or'ed combination of the following constants: MK_Shift, MK_Control, MK_LButton, MK_RButton, MK_MButton, MK_XBUTTON1 and MK_XBUTTON2 into what? ? WindowStateToStr - converts a Window state to a string StrToWindowState - converts a string to a Window state Formats various typed values into readable text. The formatted value. ? Returns the remembered control ? Remembers the control in LastFocusedControl. ? ? The topmost Form containing Control. Does a recursive search for the first Parent of type TCustomForm. ? ? 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 an literal (displayed) ampersand. 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 an Hint string. A short Hint is separated from the long Hint by an '|'. When no such character is found, the whole Hint is returned. The short (or complete) Hint. The string containing both an short and long Hint. Returns the long version of an Hint string. The TApplication singleton. The TScreen singleton. The current exception object ? The class to be used for hints ? 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 therfore any descendant when it is created via Create(Owner). If the resource 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 resourceless 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 of a MessageBox function. used where? Maps form border styles into their border icons. Creates the widgetset ? Destroys almost all singletons ? Registers a few components, declared in this unit. Handler invoked when there is an exception circle before killing the app with Halt