假设窗体启动的时候 如果加载的东西多了 那么就要写很多吗??
VB 就很简单咯  直接call到子程序中就可以调用了求delphi代码 应该怎么写呢?Private Sub Command1_Click()
call ceshi
End SubPrivate Sub ceshi()
msgbox "测试而已"
End Sub

解决方案 »

  1.   

    前面不知你说什么。后面代码问题在DELPHI可更简单咯。下面是一个测试单元文件。
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}
    procedure ceshi;
    begin
      showmessage('測試!');
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
      ceshi;
    end;end.
      

  2.   

    这是调用其它过程或者函数
    delphi更简单,没有关键词call,直接写过程/函数名ceshi;