窗口A,
窗口B,都有可能调用窗口C(当然不是在同一时刻)....并向他传递一个参数(例窗口C的变量pub1)

解决方案 »

  1.   

    a,b所在的单元同时引用c所在的单元
      

  2.   

    窗口C的变量pub1
    定义在 public下
     pnb1:integer;窗口a调用:
    fromc:=tfromc.create(self);
    fromc.pub1:=1;
    fromc.ShowModal;窗口b调用:
    fromc:=tfromc.create(self);
    fromc.pub1:=2;
    fromc.ShowModal;
      

  3.   

    以上的不是很好吧,呵呵
    可以重载C窗体啊
    private
      publ:DataType;
    Constructor Create(AOwner:TComponent;publ:DataType);override;
    Constructor FormC.Create(AOwner:TComponent;publ:DataType);
    begin
      Inherited Create(AOwner:TComponent);
    publ:=publ;
    end;