MDICloseEventArgs.Create

Syntax

Create(MDIChild: IFormControl);

Parameters

MDIChild - MDI child form that will be closed.

Description

The Create constructor creates an argument of the event that occurs at the moment when the MDI child form is closed.

Example

Executing the example requires a form. This form is a MDI parent form that contains several child ones. The MDI parent form has a toolbar that contains at least one button.

Sub ToolbarButton1OnClick(Sender: Object; Args: IEventArgs);

Var

Arg: IMDICloseEventArgs;

Begin

Arg := New MDICloseEventArgs.Create(Self.MDIChildren(0));

Self.OnMDIClose(Self, Arg);

End Sub ToolbarButton1OnClick;

After executing the example pressing the button of the toolbar generates the event for closing the first MDI child form for the MDI parent form. Actually, the MDI child form is not closed.

See also:

MDICloseEventArgs