若第二个表单不关闭的情况下,无法选取第一个表单。 -------------------------------------------------- 如果不用模式 if not assign(form2) then其实我不懂你的意思 摸在Form2查询后,继续在这里操作Form1就可以了啊 然后把Form2关闭了 去操作你的Form1
无论是用 form2:=Tform2.create(self); try form2.showmodal; finally freeandnil(form2); end;还是用 if not assigned(F_Employee_Find) then begin F_Employee_Find:=TF_Employee_Find.Create(self); F_Employee_Find.showmodal; //此处报错 end else F_Employee_Find.ShowModal;
都提示报错信息:Cannot make a visible window modal这是什么意思啊?
我把form2.visible:=false;就通过了但是,这样只是父表单调用子表单我在子表单返回父表单是,把程序设置如下:if not assigned(form1) then begin form1:=form1.Create(self); showmessage('form1 not assigned'); end else showmessage('form1 have assigned');程序总是走showmessage('form1 not assigned');我想应该是别的地方出问题了,但是又没有方向,困惑阿。请大家指条明路吧,谢谢。
第一个表单的:
implementation
uses unit2; procedure Tform1.button1click(sender:Tobject);
begin
form2:=Tform2.create(self);
try
form2.showmodal;
finally
freeandnil(form2);
end;
end;
--------------------------------------------------
如果不用模式
if not assign(form2) then其实我不懂你的意思
摸在Form2查询后,继续在这里操作Form1就可以了啊
然后把Form2关闭了
去操作你的Form1
form2:=Tform2.create(self);
try
form2.showmodal;
finally
freeandnil(form2);
end;还是用
if not assigned(F_Employee_Find) then
begin
F_Employee_Find:=TF_Employee_Find.Create(self);
F_Employee_Find.showmodal; //此处报错
end
else
F_Employee_Find.ShowModal;
都提示报错信息:Cannot make a visible window modal这是什么意思啊?
begin
form1:=form1.Create(self);
showmessage('form1 not assigned');
end
else
showmessage('form1 have assigned');程序总是走showmessage('form1 not assigned');我想应该是别的地方出问题了,但是又没有方向,困惑阿。请大家指条明路吧,谢谢。