Código
function ValidaNumero(Caracter: Char): Char;
begin
if not (Caracter in ['0'..'9', #8, #13]) then
Result:= #0
else
Result:= Caracter;
end;
//chamando no OnKeyPress do TEdit
Key:= ValidaNumero(Key);
//é um exemplo meio bobinho mas ajuda ;)
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009