Ver Mensaje Individual
  #2  
Antiguo 23-07-2005
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 28
Lepe Va por buen camino
Código Delphi [-]
procedure TVentas_b.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);

  Begin
    if key > 31 then // Dejamos que se pulsen teclas de control
      if not(chr(Key) in ['0','1', '2','3','4','5','6','7','8','9' ]) then
          key := 0; // esto es lo que faltaba, anulamos la tecla.
  end;
end.

Por cierto, si usa el portapapeles, si permitirá pegar letras

Un saludo
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita