procedure TFrmGroup.FormKeyPress(Sender : TObject; var Key : Char); begin If Key = #13 Then Begin Key := #0; ModalResult := mrYes; End; end;