解决方法
MDI子表单(实际上是任何表单)在被销毁时将通知主表单.您可以使用此通知机制.例:
type TForm1 = class(TForm) .. protected procedure Notification(AComponent: TComponent; Operation: TOperation); override; .. procedure TForm1.Notification(AComponent: TComponent; Operation: TOperation); begin inherited; if (Operation = opRemove) and (AComponent is TForm) and (TForm(AComponent).FormStyle = fsMDIChild) and (MDIChildCount = 0) then begin // do work end; end;