把 procedure  TForm1.FormKeyDown(Sender:  TObject;  var  Key:  Word;
      Shift:  TShiftState);
  begin
      if  (key  =  38)  or  (Key  =  33)  then
          Edit1.Text:=inttostr(Random(100));
  
      if  (key  =  40)  or  (Key  =  34)    then
          Edit1.Text:=inttostr(Random(100));
  
      Edit1.SelectAll;//失效
  end;改为procedure  TForm1.FormKeyUp(Sender:  TObject;  var  Key:  Word;
      Shift:  TShiftState);
  begin
      if  (key  =  38)  or  (Key  =  33)  then
          Edit1.Text:=inttostr(Random(100));
  
      if  (key  =  40)  or  (Key  =  34)    then
          Edit1.Text:=inttostr(Random(100));
  
      Edit1.SelectAll;//失效
  end;