TScreen class
Provides information about screen displays in an application.
Declaration
TScreen = class(TLCLComponent)Inheritance
- TScreen
- TLCLComponent
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
MagnetManager | protected | Manages screen / form snapping behavior for the screen. |
ActiveControl | public | The control which has the focus on the active form for the screen. |
ActiveCustomForm | public | The TCustomForm instance which has the focus. |
ActiveForm | public | The TForm instance which has the focus. |
Cursor | public | Indicates the current mouse cursor shape. |
RealCursor | public | Gets the value for the Cursor property taking temporary cursors into account. |
Cursors | public | Provides indexed access to the available mouse cursor shapes for the screen. |
CustomFormCount | public | Number of TCustomForm form instances in the CustomForms property. |
CustomForms | public | Provides indexed access to the TCustomForm instances on the screen. |
CustomFormZOrderCount | public | Number of custom forms instances in the CustomFormsZOrdered property. |
CustomFormsZOrdered | public | The list of Custom Forms, indexed by Z-order (zero is top-most). |
DesktopLeft | public | The left-most coordinate of the desktop. |
DesktopTop | public | The top-most coordinate for the desktop. |
DesktopHeight | public | The total vertical size for the desktop. |
DesktopWidth | public | The total horizontal size for the desktop. |
DesktopRect | public | Bounds rectangle for the desktop spanning all monitors. |
FocusedForm | public | The form that has Focus on the screen. |
FormCount | public | The number of Forms on the screen. |
Forms | public | Provides indexed access to TForm instances on the screen. |
DataModuleCount | public | The number of data modules for the screen. |
DataModules | public | Provides thread-safe indexed access to data modules on the screen. |
HintFont | public | The font used to display Hints. |
IconFont | public | The font used for desktop icons. |
MenuFont | public | The font used in menus. |
SystemFont | public | The default font used for system task dialogs and controls like TSpeedButton. |
Fonts | public | The names for the available (installed) fonts. |
Height | public | The height of the primary monitor. |
MonitorCount | public | The number of available Monitors. |
Monitors | public | Provides indexed access to the available monitors in the class instance. |
PixelsPerInch | public | The number of screen pixels per virtual inch (DPI) for the screen. |
PrimaryMonitor | public | The primary monitor which typically includes the task bar area. |
Width | public | The width of the primary monitor. |
WorkAreaRect | public | The usable display area on the primary monitor excluding the task bar. |
WorkAreaHeight | public | The usable height of the primary monitor excluding the system task bar. |
WorkAreaLeft | public | The usable left coordinate on the primary monitor. |
WorkAreaTop | public | The usable top coordinate on the primary monitor. |
WorkAreaWidth | public | The usable width for the WorkAreaRect. |
Methods
GetHintFont | protected | Gets the value for the HintFont property. |
GetIconFont | protected | Gets the value for the IconFont property. |
GetMenuFont | protected | Gets the value for the MenuFont property. |
GetSystemFont | protected | Gets the value for the SystemFont property. |
Notification | protected | Performs actions when the specified component is added to or removed from the class instance. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
CustomFormIndex | public | Gets the ordinal position in CustomForms for the requested form. |
FormIndex | public | Gets the ordinal position in Forms for the requested form. |
CustomFormZIndex | public | Gets the position in CustomFormsZOrdered for the specified form. |
MoveFormToFocusFront | public | Moves the specified form to the front of all other forms. |
MoveFormToZFront | public | Moves the form to the front of the Z-order in the CustomFormsZOrdered property. |
NewFormWasCreated | public | Notifies handler(s) when a new form is created for the TScreen instance. |
GetCurrentModalForm | public | Returns the Modal form at the top of the Z-order for the screen. |
GetCurrentModalFormZIndex | public | Returns the index of the top-most modal form in CustomFormsZOrdered. |
CustomFormBelongsToActiveGroup | public | Checks whether the specified form is present in the Z-ordered list of forms. |
FindNonDesignerForm | public | Finds the form with the specified name, excluding designer forms. |
FindForm | public | Finds a form on the screen by its name. |
FindNonDesignerDataModule | public | Finds a data module with the specified name, excluding designer data modules. |
FindDataModule | public | Finds the data module with the specified name. |
UpdateMonitors | public | Rebuilds the list of available monitors. |
UpdateScreen | public | Updates the value for the PixelsPerInch property. |
RemoveAllHandlersOfObject | public | Removes all handler routines for the specified object regardless of notification type. |
AddHandlerNewFormCreated | public | Adds the specified handler routine to the new form handlers for the screen instance. |
RemoveHandlerNewFormCreated | public | Removes the specified handler routine from the new form handlers for the screen instance. |
AddHandlerFormAdded | public | Adds a form added notification handler to the class instance. |
RemoveHandlerFormAdded | public | Removes a form added notification handler. |
AddHandlerRemoveForm | public | Adds a form removed notification handler. |
RemoveHandlerRemoveForm | public | Removes a from removed notification handler. |
AddHandlerActiveControlChanged | public | Adds a control changed notification handler. |
RemoveHandlerActiveControlChanged | public | Removes a control changed notification handler. |
AddHandlerActiveFormChanged | public | Adds a form changed notification handler. |
RemoveHandlerActiveFormChanged | public | Removes a form changed notification handler. |
AddHandlerFormVisibleChanged | public | Adds a visible changed notification handler. |
RemoveHandlerFormVisibleChanged | public | Removes a visible changed notification handler. |
DisableForms | public | Disables all forms except for SkipForm. |
EnableForms | public | Re-enables forms disabled in the DisableForms method. |
MonitorFromPoint | public | Finds the monitor containing the given screen coordinates. |
MonitorFromRect | public | Finds the monitor where the specified rectangle is located. |
MonitorFromWindow | public | Finds the monitor containing the form with the given window handle. |
BeginTempCursor | public | Sets the Cursor property to a temporary shape. Use EndTempCursor to release it. |
EndTempCursor | public | Releases a temporary mouse cursor set with BeginTempCursor. |
BeginWaitCursor | public | Sets the cursor to the shape in crHourGlass. |
EndWaitCursor | public | Removes the crHourGlass mouse cursor shape. |
BeginScreenCursor | public | Changes the active cursor to the most recent shape in the internal list of cursors. |
EndScreenCursor | public | Removes the current mouse cursor shape from the internal list, and restores the previous cursor shape. |
Events
OnActiveControlChange | public | Event handler signalled when the active form control for the screen has been changed. |
OnActiveFormChange | public | Event 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.
