procedure TApplication.ControlDestroyed(Control: TControl);
begin
if FMainForm = Control then FMainForm := nil;
if FMouseControl = Control then FMouseControl := nil;
if Screen.FActiveControl = Control then Screen.FActiveControl := nil;
if Screen.FActiveCustomForm = Control then
begin
If (Control Is TCustomForm) and (TCustomForm(Control).FormStyle = fsMDIChild) then {V}
begin
Screen.FActiveCustomForm := FMainForm;
Screen.FActiveForm := FMainForm;
end
else
begin
Screen.FActiveCustomForm := nil;
Screen.FActiveForm := nil;
end
end;
if Screen.FFocusedForm = Control then Screen.FFocusedForm := nil;
if FHintControl = Control then FHintControl := nil;
Screen.UpdateLastActive;
end;
Комментариев нет:
Отправить комментарий