When ShowModal
is called, all existing top level windows are disabled. That's how modality is meant to work. If you have a window with which interaction is reasonable, you just need to enable it again.
For example, you could add this to your utility window:
type
TMyUtilityForm = class(TForm)
protected
procedure WMEnable(var Message: TWMEnable); message WM_ENABLE;
end;
....
procedure TMyUtilityForm.WMEnable(var Message: TWMEnable);
begin
if not Message.Enabled then
EnableWindow(Handle, True);
inherited;
end;
This will make sure that your utility window can never be disabled.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…