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

# TScreen.DisableForms

Disables all forms except for SkipForm.

## Declaration

Source position: forms.pp line 1255

`public function TScreen.DisableForms(`
`SkipForm: TCustomForm;`
`DisabledList: TList = Nil`
`):TList;`

## Arguments

`SkipForm` |  | Don't disable this form (ignored if Nil).
`DisabledList` |  | The list to update. If Nil, a new list is created and returned.

## Function result

The list containing all disabled forms.

## Description

Used to disable forms when a modal form or dialog is displayed.

The enabled state for forms is determined by the widgetset class, and not from LCL properties. If DisabledList is Nil, a new list is created. All forms disabled in the method are added to the list. When the modal form returns, EnableForms is called to restore the list of forms disabled in the method.

## See also

TScreen.EnableForms |  | Re-enables forms disabled in the DisableForms method.