Sign in Join
FPDoc Onlineexperiment

TScreen class

In unit Forms

Provides information about screen displays in an application.

Declaration

pascal
TScreen = class(TLCLComponent)

Inheritance

  1. TScreen
  2. TLCLComponent
  3. TComponent

Description

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.

See also

Properties

MagnetManagerprotectedManages screen / form snapping behavior for the screen.
ActiveControlpublicThe control which has the focus on the active form for the screen.
ActiveCustomFormpublicThe TCustomForm instance which has the focus.
ActiveFormpublicThe TForm instance which has the focus.
CursorpublicIndicates the current mouse cursor shape.
RealCursorpublicGets the value for the Cursor property taking temporary cursors into account.
CursorspublicProvides indexed access to the available mouse cursor shapes for the screen.
CustomFormCountpublicNumber of TCustomForm form instances in the CustomForms property.
CustomFormspublicProvides indexed access to the TCustomForm instances on the screen.
CustomFormZOrderCountpublicNumber of custom forms instances in the CustomFormsZOrdered property.
CustomFormsZOrderedpublicThe list of Custom Forms, indexed by Z-order (zero is top-most).
DesktopLeftpublicThe left-most coordinate of the desktop.
DesktopToppublicThe top-most coordinate for the desktop.
DesktopHeightpublicThe total vertical size for the desktop.
DesktopWidthpublicThe total horizontal size for the desktop.
DesktopRectpublicBounds rectangle for the desktop spanning all monitors.
FocusedFormpublicThe form that has Focus on the screen.
FormCountpublicThe number of Forms on the screen.
FormspublicProvides indexed access to TForm instances on the screen.
DataModuleCountpublicThe number of data modules for the screen.
DataModulespublicProvides thread-safe indexed access to data modules on the screen.
HintFontpublicThe font used to display Hints.
IconFontpublicThe font used for desktop icons.
MenuFontpublicThe font used in menus.
SystemFontpublicThe default font used for system task dialogs and controls like TSpeedButton.
FontspublicThe names for the available (installed) fonts.
HeightpublicThe height of the primary monitor.
MonitorCountpublicThe number of available Monitors.
MonitorspublicProvides indexed access to the available monitors in the class instance.
PixelsPerInchpublicThe number of screen pixels per virtual inch (DPI) for the screen.
PrimaryMonitorpublicThe primary monitor which typically includes the task bar area.
WidthpublicThe width of the primary monitor.
WorkAreaRectpublicThe usable display area on the primary monitor excluding the task bar.
WorkAreaHeightpublicThe usable height of the primary monitor excluding the system task bar.
WorkAreaLeftpublicThe usable left coordinate on the primary monitor.
WorkAreaToppublicThe usable top coordinate on the primary monitor.
WorkAreaWidthpublicThe usable width for the WorkAreaRect.

Methods

GetHintFontprotectedGets the value for the HintFont property.
GetIconFontprotectedGets the value for the IconFont property.
GetMenuFontprotectedGets the value for the MenuFont property.
GetSystemFontprotectedGets the value for the SystemFont property.
NotificationprotectedPerforms actions when the specified component is added to or removed from the class instance.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
CustomFormIndexpublicGets the ordinal position in CustomForms for the requested form.
FormIndexpublicGets the ordinal position in Forms for the requested form.
CustomFormZIndexpublicGets the position in CustomFormsZOrdered for the specified form.
MoveFormToFocusFrontpublicMoves the specified form to the front of all other forms.
MoveFormToZFrontpublicMoves the form to the front of the Z-order in the CustomFormsZOrdered property.
NewFormWasCreatedpublicNotifies handler(s) when a new form is created for the TScreen instance.
GetCurrentModalFormpublicReturns the Modal form at the top of the Z-order for the screen.
GetCurrentModalFormZIndexpublicReturns the index of the top-most modal form in CustomFormsZOrdered.
CustomFormBelongsToActiveGrouppublicChecks whether the specified form is present in the Z-ordered list of forms.
FindNonDesignerFormpublicFinds the form with the specified name, excluding designer forms.
FindFormpublicFinds a form on the screen by its name.
FindNonDesignerDataModulepublicFinds a data module with the specified name, excluding designer data modules.
FindDataModulepublicFinds the data module with the specified name.
UpdateMonitorspublicRebuilds the list of available monitors.
UpdateScreenpublicUpdates the value for the PixelsPerInch property.
RemoveAllHandlersOfObjectpublicRemoves all handler routines for the specified object regardless of notification type.
AddHandlerNewFormCreatedpublicAdds the specified handler routine to the new form handlers for the screen instance.
RemoveHandlerNewFormCreatedpublicRemoves the specified handler routine from the new form handlers for the screen instance.
AddHandlerFormAddedpublicAdds a form added notification handler to the class instance.
RemoveHandlerFormAddedpublicRemoves a form added notification handler.
AddHandlerRemoveFormpublicAdds a form removed notification handler.
RemoveHandlerRemoveFormpublicRemoves a from removed notification handler.
AddHandlerActiveControlChangedpublicAdds a control changed notification handler.
RemoveHandlerActiveControlChangedpublicRemoves a control changed notification handler.
AddHandlerActiveFormChangedpublicAdds a form changed notification handler.
RemoveHandlerActiveFormChangedpublicRemoves a form changed notification handler.
AddHandlerFormVisibleChangedpublicAdds a visible changed notification handler.
RemoveHandlerFormVisibleChangedpublicRemoves a visible changed notification handler.
DisableFormspublicDisables all forms except for SkipForm.
EnableFormspublicRe-enables forms disabled in the DisableForms method.
MonitorFromPointpublicFinds the monitor containing the given screen coordinates.
MonitorFromRectpublicFinds the monitor where the specified rectangle is located.
MonitorFromWindowpublicFinds the monitor containing the form with the given window handle.
BeginTempCursorpublicSets the Cursor property to a temporary shape. Use EndTempCursor to release it.
EndTempCursorpublicReleases a temporary mouse cursor set with BeginTempCursor.
BeginWaitCursorpublicSets the cursor to the shape in crHourGlass.
EndWaitCursorpublicRemoves the crHourGlass mouse cursor shape.
BeginScreenCursorpublicChanges the active cursor to the most recent shape in the internal list of cursors.
EndScreenCursorpublicRemoves the current mouse cursor shape from the internal list, and restores the previous cursor shape.

Events

OnActiveControlChangepublicEvent handler signalled when the active form control for the screen has been changed.
OnActiveFormChangepublicEvent handler signalled when the active form on the screen has been changed.

Inherited

From TLCLComponent (7)

DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance WidgetSetClass WSRegisterClass

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.