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

TCustomForm.MakeFullyVisible

Resizes the form for the specified monitor.

Declaration

Source position: forms.pp line 728

public procedure TCustomForm.MakeFullyVisible(

  AMonitor: TMonitor = Nil;

  UseWorkarea: Boolean = True

);

Arguments

AMonitor

  

The monitor where the form is displayed, or Nil to use the design-time monitor.

UseWorkarea

  

When True the form is adjusted to the bounds for the WorkArea for the monitor. Otherwise, the form is clipped to the monitor bounds.

Description

MakeFullyVisible is a method used to make the form instance fully visible on the specified monitor. It ensures the form fits within the required bounds for the monitor or work area. If the form is too wide or too tall, the form bounds are adjusted so that the form fits within the required bounds. This prevents the form from being partially visible on multiple monitors.

AMonitor is the TMonitor instance where the form is displayed. If AMonitor is not specified (contains Nil), the value in the Monitor property is used.

UseWorkarea indicates whether the work area for the target monitor is used. When set to True, the form uses the bounds established for the work area instead of the physical monitor. The default value for the parameter is True.

Remark: The default value for UseWorkArea was changed from False to True in LCL version 2.3.0. This is the more sensible default value, and it is also Delphi-compatible.

Version 3.2 Generated 2024-02-25 Home