B
bjaman
Unregistered / Unconfirmed
GUEST, unregistred user!
一个很简单的窗口显示的调用方法:
procedure LoadCollectModule;
begin
if not Assigned(frmRepCollectResult) then
frmRepCollectResult := TfrmRepCollectResult.Create(nil);
try
frmRepCollectResult.Visible := False;
frmRepCollectResult.ShowModal;
finally
FreeAndNil(frmRepCollectResult);
end;
end;
在执行到 frmRepCollectResult.ShowModal;时报错如下:
---------------------------
Debugger Exception Notification
---------------------------
Project report.exe raised exception class EInvalidOperation with message 'Cannot make a visible window modal'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
各位有没有遇到过这种情况? frmRepCollectResult.Visible := False;是为了避免出错加上去的,原本并不需要。只是加上了仍然报错。
procedure LoadCollectModule;
begin
if not Assigned(frmRepCollectResult) then
frmRepCollectResult := TfrmRepCollectResult.Create(nil);
try
frmRepCollectResult.Visible := False;
frmRepCollectResult.ShowModal;
finally
FreeAndNil(frmRepCollectResult);
end;
end;
在执行到 frmRepCollectResult.ShowModal;时报错如下:
---------------------------
Debugger Exception Notification
---------------------------
Project report.exe raised exception class EInvalidOperation with message 'Cannot make a visible window modal'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
各位有没有遇到过这种情况? frmRepCollectResult.Visible := False;是为了避免出错加上去的,原本并不需要。只是加上了仍然报错。