[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TScreen

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Provides information about the display and related objects.

Declaration

Source position: forms.pp line 1014

type TScreen = class(TLCLComponent) end;

protected

  function GetHintFont; virtual;

  function GetIconFont; virtual;

  function GetMenuFont; virtual;

  function GetSystemFont; virtual;

public

  constructor Create(); override;

  destructor Destroy; override;

  function CustomFormIndex();

  

Returns the CustomForms[] Index of the form.

  function FormIndex();

  

Returns the Forms[] Index of the form.

  function CustomFormZIndex();

  

The index of the form in the Z dimension (Front to Back).

  procedure MoveFormToFocusFront();

  

Moves the form to the front of all form lists.

  procedure MoveFormToZFront();

  

Moves the form to the front of the Z-order list (notification only).

  function GetCurrentModalForm;

  

Returns the topmost Modal form (ie a form that is awaiting a user response).

  function GetCurrentModalFormZIndex;

  

Returns the index of the tompost modal form in CustomFormsZOrdered[].

  function CustomFormBelongsToActiveGroup();

  

Checks whether the form is visible and either modal or not blocked by another modal form.

  function FindNonDesignerForm();

  

Finds the named form, excluding designer forms.

  function FindForm();

  

Finds a form by its name.

  function FindNonDesignerDataModule();

  

Finds the named DataModule, excluding designer modules.

  function FindDataModule();

  

Finds the named DataModule.

  procedure UpdateMonitors;

  

Builds the list of available monitors.

  procedure UpdateScreen;

  

Updates the TScreen.PixelsPerInch property.

  procedure RemoveAllHandlersOfObject(); override;

  

Override this method to remove all references to notification handlers in AnObject.

  procedure AddHandlerFormAdded();

  

Adds an notification handler.

  procedure RemoveHandlerFormAdded();

  

Removes an notification handler.

  procedure AddHandlerRemoveForm();

  

Adds an notification handler.

  procedure RemoveHandlerRemoveForm();

  

Removes an notification handler.

  procedure AddHandlerActiveControlChanged();

  

Adds an notification handler.

  procedure RemoveHandlerActiveControlChanged();

  

Removes an notification handler.

  procedure AddHandlerActiveFormChanged();

  

Adds an notification handler.

  procedure RemoveHandlerActiveFormChanged();

  

Removes an notification handler.

  procedure AddHandlerFormVisibleChanged();

  

Adds an notification handler.

  procedure RemoveHandlerFormVisibleChanged();

  

Removes an notification handler.

  function DisableForms();

  

Disable all forms except SkipForm.

  procedure EnableForms();

  

Use this method to restore all previously disabled forms.

  function MonitorFromPoint();

  

Find the monitor containing the given screen coordinates.

  function MonitorFromRect();

  

Find the monitor containing (most of) the given screen coordinates.

  function MonitorFromWindow();

  

Find the monitor containing (most of) the given window.

  property ActiveControl: TWinControl; [r]

  

The control which has the Focus.

  property ActiveCustomForm: TCustomForm; [r]

  

The custom form which has the Focus.

  property ActiveForm: TForm; [r]

  

The form which has the Focus.

  property Cursor: TCursor; [rw]

  

The current mouse cursor shape.

  property Cursors []: HCURSOR; [rw]

  

The indexed list of available cursor shapes.

  property CustomFormCount: Integer; [r]

  

The number of Custom Forms.

  property CustomForms []: TCustomForm; [r]

  

The indexed list of Custom Forms.

  property CustomFormZOrderCount: Integer; [r]

  

CustomFormZOrderCount - the number of forms arranged in Z-plane order (ie Front to Back)

  property CustomFormsZOrdered []: TCustomForm; [r]

  

The list of Custom Forms, indexed by Z-order (zero is topmost).

  property DesktopLeft: Integer; [r]

  

The leftmost coordinate of the desktop.

  property DesktopTop: Integer; [r]

  

The topmost coordinate of the desktop.

  property DesktopHeight: Integer; [r]

  

The total vertical size of the desktop.

  property DesktopWidth: Integer; [r]

  

The total horizontal size of the display.

  property DesktopRect: TRect; [r]

  

The total extent of the desktop, spanning all monitors.

  property FocusedForm: TCustomForm; [r]

  

The form that holds Focus

  property FormCount: Integer; [r]

  

The number of existing Forms.

  property Forms []: TForm; [r]

  

The indexed list of all Forms, in Z-order.

  property DataModuleCount: Integer; [r]

  

The number of existing data modules.

  property DataModules []: TDataModule; [r]

  

The indexed list of Data Modules.

  property HintFont: TFont; [rw]

  

The font used to display Hints.

  property IconFont: TFont; [rw]

  

The Icon font, used with desktop icons.

  property MenuFont: TFont; [rw]

  

The font used in menus.

  property SystemFont: TFont; [rw]

  

  property Fonts: TStrings; [r]

  

The names of the available (installed) fonts.

  property Height: Integer; [r]

  

The height of the primary monitor.

  property MonitorCount: Integer; [r]

  

The number of available Monitors.

  property Monitors []: TMonitor; [r]

  

The indexed list of available monitors.

  property PixelsPerInch: Integer; [r]

  

The number of screen pixels for an virtual inch (DPI), in vertical direction.

  property PrimaryMonitor: TMonitor; [r]

  

The primary monitor typically shows the taskbar.

  property Width: Integer; [r]

  

The width of the primary monitor.

  property WorkAreaRect: TRect; [r]

  

The usable display area on the primary monitor, excluding e.g. the taskbar.

  property WorkAreaHeight: Integer; [r]

  

The usable height of the primary monitor.

  property WorkAreaLeft: Integer; [r]

  

The usable left coordinate on the primary monitor.

  property WorkAreaTop: Integer; [r]

  

The usable top coordinate on the primary monitor.

  property WorkAreaWidth: Integer; [r]

  

The usable width of the primary monitor.

  property OnActiveControlChange: TNotifyEvent; [rw]

  

Handler for a Focus changed notification.

  property OnActiveFormChange: TNotifyEvent; [rw]

  

Handler for a Focus changed notification.

Inheritance

TScreen

  

Provides information about the display and related objects.

|

TLCLComponent

  

The base class for LCL components associated with widgets.

|

TComponent

?

TObject

Description

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.

See also

TScreen.Cursors

  

The indexed list of available cursor shapes.

TScreen.DataModules

  

The indexed list of Data Modules.

TScreen.DesktopRect

  

The total extent of the desktop, spanning all monitors.

TScreen.Fonts

  

The names of the available (installed) fonts.

TScreen.Forms

  

The indexed list of all Forms, in Z-order.

TScreen.Monitors

  

The indexed list of available monitors.

TScreen.WorkareaRect

  

The usable display area on the primary monitor, excluding e.g. the taskbar.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.