我在程序设计中遇到这样一个问题:我建了一个MDI应用程序,在子窗体中加了一个edit和一个button
procedure TForm1.Button1Click(Sender: TObject);
begin
  form2.showmodal;
end;
在产生的窗体中也加了一个edit和一个buttonprocedure TForm2.Button1Click(Sender: TObject);
begin
  form1.edit1.text:=form2.edit1.text;
end;
程序可以执行,但一单击form2的button,程序就提示access violation at address 0050370 in module 'mdiapp.exe' ,read ofaddress '000000334',process stopped,use step or run to continue.
我的窗体类型form1.formstyle:=fsmdichild;
            form2.formstyle:=fsstayontop;
不知与这有没有关系。