各位高手我用的是7.0企业版
我在主窗口(单文档)里面调用另外一个form1,要去读取form1里面的控件数据
比如在form1里面我这么写的
showmessage(edit1.text);这个可以正常显示;
但是在主窗口里面我这么写的:
begin
    with  Form1 do
    begin
    showmessage(edit1.text);
    end;
结果出现运行期异常!
请问这是怎么回事啊。急待解决!!!!!!

解决方案 »

  1.   


    application.createform(tform,form1);
    with  Form1 do
        begin
        showmessage(edit1.text);
        end;
      

  2.   

    这样就不用 Uses Form1了ShowMessage(
      TCustomEdit(Application.FindComponent('Form1').FindComponent('Edit1')).Text
      );
      

  3.   

    你的问题可能是 Form1没有创建实例
      

  4.   

    form1 已经在另外一个过程里面创建了实例