在前一窗体设定一按钮,ONCLICK事件进行新开另一窗体,同时在新开窗体中可取得前一窗体的变量。

解决方案 »

  1.   

    delphi->File->Use Uint->选择你的窗体单元。
    在程序中引用:x:=unit2.xxx.xxx
      

  2.   

    TForm1 = class(TForm)
      public
        DJID  : string;
        constructor Create(AOwner:TComponent;SID:string);reintroduce;overload;
      end;constructor TForm1.Create(AOwner:TComponent;SID:string);
    //重载Create方法,接受传入的数据
    begin
      DJID:=SID;
      inherited Create(AOwner);
    end;
      

  3.   

    override the oncreate method of the new form