TcusCls = class
private
FonEvent: TNotifyEvent;
published
property onMsg: TNotifyEvent read FonEvent write FonEvent;
public
procedure Cusevent(Sender: TObject);
end;
procedure TcusCls.Cusevent;
begin
ShowMessage('oh! This is CusEvent');
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
var
Tcus: TcusCls;
begin
Tcus := TcusCls.Create;
Tcus.onMsg := Tcus.Cusevent;
Tcus.onMsg(Sender);
Tcus.Free;
end;