A
awfigsk
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Tform1.Formcreate(Sender:Tobject);
private
{ Private declarations }
public
{ Public declarations }
end;
procedure aaclick(Sender:Tobject);
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Button1.onclick:=aaclick
//为什么这条语句会出错?
end;
end.
如何将一个过程赋给Button1.onclick?(这个过程不放在TForm1类中.)
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Tform1.Formcreate(Sender:Tobject);
private
{ Private declarations }
public
{ Public declarations }
end;
procedure aaclick(Sender:Tobject);
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Button1.onclick:=aaclick
//为什么这条语句会出错?
end;
end.
如何将一个过程赋给Button1.onclick?(这个过程不放在TForm1类中.)