procedure TForm1.CheckNumberKey(Sender: TObject; var Key: Char);
begin
If (Length(Edit1.Text) = 0) and (Key = ',') then
begin
Key := Chr(0);
exit;
end;
if (Pos(',',Edit1.Text) <> 0) and (Key = ',') then
begin
Key := Chr(0);
exit;
end;
If not (Key in ['0'..'9',',',#8]) then Key := Chr(0);
end;