除使用全局参数外,不同form之间如何如何传递信息?能设计含参数的form吗?

解决方案 »

  1.   

    type
      TForm1 = class(TForm)
        procedure FormShow(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
        abc: Integer;
      end;procedure TForm1.FormShow(Sender: TObject);
    begin
      // use abc
    end;procedure showform(n: Integer);
    begin
      form := TForm1.Create(...);
      try
        form.abc := n;
        form.showmodal;
      finally
        form.Free;
      end;
    end;