Monitor#

Qualified name: delphivcl.Monitor

class Monitor#

Bases: Object

TMonitor represents a monitor on which an application runs. TMonitor represents a monitor that displays the user interface of an application. It introduces properties to describe the dimensions of a single monitor. In addition, the Primary property distinguishes the primary property from other monitors on the system. When writing multi-monitor applications, use TMonitor to help lay out forms and dialogs so that they are not split over several monitors. Applications do not create instances of TMonitor. Instead, monitor components for all available monitors are listed by the Monitors property of the global Screen variable. The global Screen variable also provides global information about the monitors on which the application runs, such as screen resolution, available fonts, and so on.

Methods

Free

Frees the Wrapped Delphi Object

InheritsFrom

Returns True if Delphi Object is or inherits from ClassName

SetProps

Sets several properties in one call

ToList

If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.

ToTuple

If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.

Attributes

BoundsRect

Indicates the dimensions of the monitor in pixels.

Handle

Indicates the Windows handle for the monitor.

Height

Indicates the vertical size of the monitor in pixels.

Left

Indicates the logical position of the left edge of the monitor.

MonitorNum

Specifies the index of the monitor in the global screen object's Monitors list.

PixelsPerInch

Embarcadero Technologies does not currently have any additional information.

Primary

Indicates whether this is the primary monitor.

Top

Indicates the logical position of the top edge of the monitor.

Width

Indicates the horizontal size of the monitor in pixels.

WorkareaRect

Gives the application useable area of the monitor.

BoundsRect#

Indicates the dimensions of the monitor in pixels. Read BoundsRect to learn the dimensions of the monitor. BoundsRect gives the dimensions of the monitor in pixels, where (0,0) represents the top-left corner of the primary monitor. The top of BoundsRect is given by the Top property, the left edge by the Left property, and the height and width by the Height and Width properties respectively.

Note: The BoundsRect property does not take into account any task bars or tool bars docked on the monitor. To determine the area on the monitor that is free of such docked windows, use the WorkareaRect property.

Free()#

Frees the Wrapped Delphi Object

Handle#

Indicates the Windows handle for the monitor. Read Monitor to obtain a Windows handle for the monitor represented by this TMonitor component. Use this handle for Windows API calls such as GetMonitorInfo.

Height#

Indicates the vertical size of the monitor in pixels. Read Height to learn the size of the monitor in pixels. Use this value along with the Top property to calculate how to position objects vertically in multi-monitor applications.

Note: The Height property does not take into account any task bars or tool bars docked on the monitor. To determine the area on the monitor that is free of such docked windows, use the WorkareaRect property.

InheritsFrom(ClassName)#

Returns True if Delphi Object is or inherits from ClassName

Left#

Indicates the logical position of the left edge of the monitor. In multi-monitor applications, the available screen space can span multiple monitors from left to right. Read Left to determine where, in the entire available screen space, this monitor appears. The value of Left is in pixels relative to the left edge of the primary monitor.

MonitorNum#

Specifies the index of the monitor in the global screen object’s Monitors list. The global screen variable maintains a list of all monitors in a multi-monitor application. MonitorNum is the index of this monitor in the list object that is the screen’s Monitors property. Use MonitorNum to identify a specific monitor when working with multiple monitors.

PixelsPerInch#

Embarcadero Technologies does not currently have any additional information.

Primary#

Indicates whether this is the primary monitor. Read Primary to determine whether a monitor is the primary monitor in a multi-monitor application. When Primary is true, the monitor is the primary monitor. The coordinates of other monitors are given in terms of the primary monitor.

SetProps(prop1=val1, prop2=val2...)#

Sets several properties in one call

ToList()#

If the object is a container (TStrings, TComponent…), it returns the content of the sequence as a Python list object.

ToTuple()#

If the object is a container (TStrings, TComponent…), it returns the content of the sequence as a Python tuple object.

Top#

Indicates the logical position of the top edge of the monitor. In multi-monitor applications, the available screen space can span multiple monitors from top to bottom. Read Top to determine where, in the entire available screen space, this monitor appears. The value of Top is in pixels relative to the top edge of the primary monitor.

Width#

Indicates the horizontal size of the monitor in pixels. Read Width to learn the size of the monitor in pixels. Use this value along with the Left property to calculate vertical positions for objects in multi-monitor applications.

Note: The Width property does not take into account any task bars or tool bars docked on the monitor. To determine the area on the monitor that is free of such docked windows, use the WorkareaRect property.

WorkareaRect#

Gives the application useable area of the monitor. WorkareaRect returns a TRect value furnished with the coordinates and dimensions of the work area of the Monitor. On Windows, for example, the application tabs at the screen mean that the Workarea is smaller than the monitor size.

Note: The TRect Right and Bottom values are one pixel beyond Workarea boundary. They are given these values to allow for easy calculation of Workarea width and height as (Right-Left) and (Bottom-Top) respectively.