谢谢大家,大家以上说的我都做了:Unit1中包含了Unit2,Form2不是Auto Create Form,Form2的visible属性为true,我用 procedure ............. var temp:Tform2; begin temp:=TForm2.Create(self); temp.Showmodal; ..... temp.free; .... end; 显示时出现了一个错误提示:"Can not make a visible window modal"。 看来大家是帮不了我了,可能是逻辑上的错误。
procedure .............
var temp:Tform2;
begin
temp:=TForm2.Create(self);
temp.Showmodal;
.....
temp.free;
....
end;
你在一个窗口调用另一个时,先应该应用它的程序,即uses unit
在mdi的程序中调用别的窗口时就不用show和showmodl了,
明白了吗?兄弟请指教
procedure .............
var temp:Tform2;
begin
temp:=TForm2.Create(self);
temp.Showmodal;
.....
temp.free;
....
end; 显示时出现了一个错误提示:"Can not make a visible window modal"。
看来大家是帮不了我了,可能是逻辑上的错误。
temp:=TForm2.Create(self);
改成
temp:=TForm2.Create(application);
试试
有一次我在Form2的Close事件代码中加上Action:=cafree;就没事了,你可以试试。