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

TScreen.MoveFormToFocusFront

Moves the specified form to the front of all other forms.

Declaration

Source position: forms.pp line 1222

public procedure TScreen.MoveFormToFocusFront(

  ACustomForm: TCustomForm

);

Arguments

ACustomForm

  

Form instance to move to the top of the Z-order.

Description

MoveFormToFocusFront is a method used to move the form specified in ACustomForm to the top of the Z-order. This means that it appears on top of all other visible forms for the application.

MoveFormToFocusFront is called when the focused control is changed in the TCustomForm instance. It is also called from the ShowModal method in TCustomForm.

It ensures that ACustomForm is moved to the first position in CustomForms (the top of the Z-order). When ACustomForm is a TForm instance, it is also moved to the first position in the Forms property. Calls MoveFormToZFront to ensure that the form is moved to the first position in the CustomFormsZOrdered property.

Errors

Raises a catchable GDB exception if the form or screen classes are being destroyed, or when ACustomForm is not assigned or not present in the CustomForms property.


Version 3.2 Generated 2024-02-25 Home