请问我想再窗口中自定义procedure应该在哪里定义,要注意那些方面
最好是有文档或例子

解决方案 »

  1.   

    private 
      procedure aaa;.....
    procedure TForm1.aaa;
    begin
    end;
      

  2.   

    type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure showmsg123(str:string);
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure Tform1.showmsg123(str:string);
    begin
    showmessage(str);
    end;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
    showmsg123('你现在明白了吗?');
    end;