Eine Möglichkeit gibts noch:
Code:
procedure FormClick(Self: TForm; Sender: TObject);
begin
ShowMessage('OK');
end;
procedure TForm1.FormCreate(Sender: TObject);
var Event: TNotifyEvent;
begin
with TMethod(Event) do begin
Code:=@FormClick;
Data:=Self;
end;
Self.OnClick:=Event; // geht !
end;
Mfg
Phantom1