'''is not a valid integer value'
是在用TAB进行跳转EDIT框时出现????但不影响整个程序运行,但每次都会弹出一个对话框出来。很烦,别人还以为是程序出错?

解决方案 »

  1.   

    检查EDIT控件的OnExit/OnEnter的事件里写的代码吧,应该是代码中存在类型转换、数据计算产生的错误
      

  2.   

    应该是代码的问题
    在EDIT控件的某事件中有代码,上面的提示是说你的EDIT的内容不是Integer类型的数据。
      

  3.   

    我在EDIT7跳转到edit8时,edit7没有事件,在edit8中有两个事件,Edit8KeyPress和Edit8KeyUp
    procedure TForm7.Edit8KeyPress(Sender: TObject; var Key: Char);
    begin
      if not (key in ['0'..'9',#8,#13])//判断是否输入的数字,删除符,回车符
        then begin
               beep;//发出警告
               key:=#0;//删除非法字符
             end;
    end;
    procedure TForm7.Edit8KeyUp(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
    if not (strtoint(self.Edit8.Text)<=strtoint(self.edit4.text))
        then begin
          beep;//发出警告
          showmessage('实际数量不能大于输入数量!');
          self.Edit8.Clear;
          self.Edit8.SetFocus;
          end;
    end;
      

  4.   

    procedure TForm7.Edit8KeyUp(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
    if (trim(self.Edit8.Text)<>'') and (trim(self.Edit4.Text)<>'') then
    if not (strtoint(self.Edit8.Text)<=strtoint(self.edit4.text))
        then begin
          beep;//发出警告
          showmessage('实际数量不能大于输入数量!');
          self.Edit8.Clear;
          self.Edit8.SetFocus;
          end;
    end
      

  5.   

    strtoint 引发的异常吧,
    可以 TRY一下呀
      

  6.   

    应该是在字段里面输入了一些个非法的整型字符。TRY一下看看吧。跟踪一下就明白了。
      

  7.   

    TO sliping(游戏人生)
          对了哈。不过我想问问trim是什么东东,在这里有什么作用呢。马上给分哈
      

  8.   

    if not (strtoint(self.Edit8.Text)<=strtoint(self.edit4.text))
    这句有问题,你试试用strtofloat
      

  9.   

    我的类型本来就是int型,怎么会是strtofloat呢?这样的话,才会出错哈!