sla8a писал(а):
Тут ответ: Модальные окна блокируют основное окноСпасибо, отлично!
Единственное что я от туда понял, что nesco пофиксил это на SVN. Но у меня не подключается этот SVN хоть убей... И с впн пробовал и так и сяк..
Может что нибудь можно сделать без SVN с этой долбаной проблемой модальности?
пс.
исправил это
на это
И теперь у меняя ваще схема не стартует)))
исправил это
function THIMainForm._onClose;
var i:integer;
p:PControl;
begin
Result := true;
if Accept and(ToIntegerEvent(_data_Close)<>0) then exit;
for i := 0 to Control.ChildCount-1 do
with Control.Children[i]{$ifndef F_P}^{$endif} do
if isForm then Perform(WM_CLOSE,0,1);
if CurForm <> nil then
PostMessage(CurForm.Handle,WM_ACTIVATE,WA_ACTIVE,0 );
CurForm := nil;
if isMain then
begin
Result := false;
_hi_OnEvent(_event_onClose);
// EventOff;
end
else
begin
p := FParent;
{$ifndef SUPER_PARENT}
while not p.isForm do p := p.Parent;
{$endif}
if p.ModalForm <> Control then
Control.Hide
else Control.ModalResult := -1;
end;
SavePosition;
Showed := False;
end;
на это
function THIMainForm._onClose;
var i:integer;
//p:PControl;
begin
Result := true;
if Accept and(ToIntegerEvent(_data_Close)‹›0) then exit;
for i := 0 to Control.ChildCount-1 do
with Control.Children[i]{$ifndef F_P}^{$endif} do
if isForm then Perform(WM_CLOSE,0,1);
if CurForm ‹› nil then
PostMessage(CurForm.Handle,WM_ACTIVATE,WA_ACTIVE,0 );
CurForm := nil;
if isMain then
begin
Result := false;
_hi_OnEvent(_event_onClose);
// EventOff;
end
else
begin
//Fix 09.11.2025 sla8a
if Control.Modal then
Control.ModalResult := -1
else
Control.Hide;
//p := FParent;
//{$ifndef SUPER_PARENT}
//while not p.isForm do p := p.Parent;
//{$endif}
//if p.ModalForm ‹› Control then
// Control.Hide
//else Control.ModalResult := -1;
end;
SavePosition;
Showed := False;
end;
И теперь у меняя ваще схема не стартует)))
Всё, разобрался)) Надо было поменять только последнее на это:
begin
//Fix 09.11.2025 sla8a
if Control.Modal then
Control.ModalResult := -1
else
Control.Hide;
end;
а не всю function THIMainForm._onClose



Поиск
Друзья
Администрация