form的showmodal碰到的问题
骑牛上铂金 2011-08-15 09:38:16 form1上有一个Button1
uses unit2,unit3;
button1.click事件调用form2
with tForm2.create(self) do
try
showmodal;
finally
free;
end;
form2上也有一个Button1
uses unit1,unit3;
button1.click事件调用form3
with tForm3.create(self) do
try
showmodal;
finally
free;
end;
再建一form3,也放一button
uses unit2,unit1
button1.click事件中showmessage(form2.button1.caption)总是报access violation错误
但如果在form2上放一button ,click事件中showmessage(form1.button1.caption)不报错
这是什么原因呀,请问才能在form3中调用form2中组件的值 呢?