begin
If key = #13 then
Begin
Key:= #0;
Perform(Wm_NextDlgCtl,0,0);
end;
end;
// Esse comando também pode ser usando dentro do OnKeyPress do TButTon .
procedure TForm1.Button1.KeyPress(Sender: TObject; var Key: Char);
begin
If key = #13 then
Begin
Key:= #0;
Perform(Wm_NextDlgCtl,0,0);
end;
end;
// Esse código não pode ser utilizado em TSpeedButton , pois o SpeedButton não recebe SetFocus.