procedure TForm1.Edit2KeyPress(......);
begin
if not (key in [#8,'0'..'9',DecimalSeperator]) then
begin
key :=#0;
end
else
begin
if (key=DecimalSeperator) and (Pos(key,Edit2.Text)>0) then
begin
key :=#0;
end;
end;
end;
procedure TForm1.Edit2KeyPress(......);
begin
if not (key in [#8,'0'..'9',DecimalSeperator]) then
begin
key :=#0;
end
else
begin
if (key=DecimalSeperator) and (Pos(key,Edit2.Text)>0) then
begin
key :=#0;
end;
end;
end;