+ -
当前位置:首页 → 问答吧 → VB中的call ceshi delphi中应该怎么写呢??

VB中的call ceshi delphi中应该怎么写呢??

时间:2011-11-10

来源:互联网

假设窗体启动的时候 如果加载的东西多了 那么就要写很多吗??
VB 就很简单咯 直接call到子程序中就可以调用了

求delphi代码 应该怎么写呢?

Private Sub Command1_Click()
call ceshi
End Sub

Private Sub ceshi()
msgbox "测试而已"
End Sub


作者: qq86079796   发布时间: 2011-11-10

前面不知你说什么。后面代码问题在DELPHI可更简单咯。下面是一个测试单元文件。
unit Unit1;

interface

uses
  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.

作者: Oraclers   发布时间: 2011-11-11