D
dcsdcs
Unregistered / Unconfirmed
GUEST, unregistred user!
类型一样可以传递
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
Frightclick:TnotifyEvent;
procedure xxx(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.xxx(Sender: TObject);
begin
showmessage('q3w2e3');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Frightclick:=xxx;
form1.OnClick:=Frightclick;
end;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
Frightclick:TnotifyEvent;
procedure xxx(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.xxx(Sender: TObject);
begin
showmessage('q3w2e3');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Frightclick:=xxx;
form1.OnClick:=Frightclick;
end;