在第一个procedure执行完后发送一条消息让第二个procedure捕捉,然后调用u-list的值就可以了

解决方案 »

  1.   

    u_list被定义为了TForm1里的一个公共变量,可以TForm1中的不同过程调用
    不过两个button之间有先后调用顺序吗?
                   如果先点击bitbutton1,那么button1中就可以直接使用u_list的值,否则u_list没有被创建,当然就不能使用啦
      

  2.   

    public
     u_list:Tstrings;procedure TForm1.BitBtn1Click(Sender: TObject);
    begin
     u_list:=Tstringlist.create;
     adoconnection1.GetFieldNames(table_name,u_list)
    end;你定义一个全局变量。。在
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs; u_list:Tstrings;//在这里定义一下type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private d
      

  3.   

    看这段代码,我测试过, 最后值是'55'unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls; var h:string;type
      TForm1 = class(TForm)
        Button1: TButton;
        Label1: TLabel;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation
    procedure cai;
    begin
     h:='5';
    end;
    Procedure cai1;
    begin
    h:=h+'5';
    form1.label1.caption:=h;
    end;{$R *.dfm}
    procedure TForm1.Button1Click(Sender: TObject);
    begin
    cai;
    cai1;
    end;end.
      

  4.   

    public
     u_list:Tstrings;procedure TWebModule1.WebModule1WAreadAction(Sender: TObject;
      Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
    begin
     u_list:=Tstringlist.Create;
     adoconnection1.GetFieldNames(writ_name,u_list);
    end;procedure TWebModule1.PPreadHTMLTag(Sender: TObject; Tag: TTag;
      const TagString: String; TagParams: TStrings; var ReplaceText: String);
    var
      i:integer;
    begin
     for i:=0 to u_list.count-1 do
     begin
      :
      :
      :
     end;
    end;
    CGI中能否实现值的传递?如何实现?
      

  5.   

    如果不能确定哪个过程先执行,应该这样做:在单元尾部加上:initialization
      u_list:= TStringList.Create;
      

  6.   

    还有:
    finalization
      u_list.Free
      

  7.   

    你先在FORM的CREATE事件中
    u_list:=Tstringlist.create;
    这样,你就可以在以后的过程中引用了
      

  8.   

    dragongong(中国龙) 具体加在什么地方?最好写完整一些。我是要在CGI程序中实现传值,你的方法可以吗?
      

  9.   

    放在程序末尾, end. 之前,像这样:…………
    initialization
      u_list:= TStringList.Create;finalization
      u_list.Free;end.                      //末尾不过我建议你最好还是把它们分别放到form的show和close里去。