I have this code
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
var
begin
if not (Key in [Ord('0')..Ord('9')]) then
Key := 0;
end;
and it worked fine with Delphi 2007. When I upgraded to Delphi 2009 and I try to press any letter it is accepted and the Key := 0 does not trap the input?
Anyone encountered the same behavior?