限制edit框只能输入数字
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if not (key in ['0'..'9','.',#8]) then
begin
key:=#0;
Messagebeep(0);
end;
end;
begin
if not (key in ['0'..'9','.',#8]) then
begin
key:=#0;
Messagebeep(0);
end;
end;
posted on 2008-06-14 17:14 DoubleCat 阅读(1132) 评论(0) 编辑 收藏 举报