Du kannst es auch so machen:
Delphi-Quellcode:
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
Var Mgs: TMsg;
begin
If Key = 13 Then
begin
PeekMessage(Mgs, 0, WM_CHAR, WM_CHAR, PM_REMOVE);
form1.SearchButtonClick(self);
end;
end;