IMDICloseEventArgs.MDIChild

Syntax

MDIChild: IFormControl;

Description

The MDIChild property returns the closed MDI child form.

Example

Executing the example requires a form. This form is a MDI parent form that contains several child ones. The value of the Tag property of the MDI forms is changed during the form work.

Sub FormOnMDIClose(Sender: Object; Args: IMDICloseEventArgs);

Begin

If Args.MDIChild.Tag = 100 Then

Args.Allow := False;

End If;

End Sub FormOnMDIClose;

After executing the example, if the user tries to close the MDI child form, if its Tag property is 100, the form closing is cancelled.

See also:

IMDICloseEventArgs