pongo esto y ahora no me captura el evento
procedure TfrmAlbaranes.FormKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
if txtDescuento.Focused then
begin
MessageDlg(Key + ' has been pressed', mtInformation, [mbOK], 0);
frmAlbaranes.SpeedButton1.Click;
end;
end;
Ademas me he asegurado que la propiedad KeyPreview del formulario esta a true.
|