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

# TCustomForm.UpdateShowing

Configures and position the form when its visibility has been changed.

## Declaration

Source position: forms.pp line 663

`protected procedure TCustomForm.UpdateShowing; override;`

## Description

UpdateShowing is an overridden method used to configure and position the form instance when the visibility for the form has been changed.

When Visible is set to True at run-time, the MoveToDefaultPosition method is called to move the form to the monitor / location in the Position property. This action is not needed (or allowed) at design-time. When FormState indicates it is the first time the form is being displayed, the DoFirstShow method is called to notify event handlers for the form.

UpdateShowing calls the inherited method to update the Handle for the form and the visibility for any child Controls.

If ActiveControl is not assigned, and there is no Parent form, the FindDefaultForActiveControl method is called to locate the first visible and enabled child control on the form. Its Handle is used to focus the control using the LCL SetFocus routine.

Finally, the visibility of the form in the task bar is updated and passed to the widgetset class.

## See also

TWinControl.UpdateShowing |  | Updates the Showing property with the visibility for the control, its Parents, and its child controls.