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

# TCustomForm.WMDPIChanged

Handles the LM_DPICHANGED window message for the form.

## Declaration

Source position: forms.pp line 623

`protected procedure TCustomForm.WMDPIChanged(`
`var Msg: TLMessage`
`); message;`

## Arguments

`Msg` |  | Window message handled in the method.

## Description

Calls AutoAdjustLayout to apply the DPI setting in Message. This action is performed when:

- The Parent for the form has not been assigned.
- Scaled is enabled for both the Application and the form instance.
- The DPI setting in Message is different than the PixelsPerInch value for the form.