delphi 只能输入数字和小数点到编辑框内,屏蔽其他字符的输入
Procedure numonly(key :char);
begin
if (not (Key in ['0'..'9']) //数字
and (Key <> '.') and (Key <> #8) ) then //小数点和退回键
begin
Key :=#0;
end;
end;
Procedure numonly(key :char);
begin
if (not (Key in ['0'..'9']) //数字
and (Key <> '.') and (Key <> #8) ) then //小数点和退回键
begin
Key :=#0;
end;
end;