在keypress事件中if not (key in ['0'..'8']) then //不是数字
begin
...
end
begin
...
end
解决方案 »
- 怎样得到系统日期和时间?
- 高手请教“线程”是什么含义??(我的积分快没有了!这里就少给些了!大家包涵)
- ????关于自动填写网页的一个小问题!!在线等待…………
- select hh,sum(sl) from hw group by hh 为什么不可以?
- 为什么不能在TADOCommand 创建的临时表中插入数据啊,谢谢大家帮忙!
- 一个关于存储过程的问题!
- delphi 制作安装(急件在线)中文会出现乱码,有谁知道补丁
- Delphi 调用C# activeX控件问题
- Delphi开发的ocx调用java开发的webservice,调不通
- 如何监视其他程序的运行?
- 总是出现错误'runtime error 216 at 004038BA',是什么原因?
- 我想要开发文档,谁能给我一份
for i:=0 up to Length(s) do begin
if S[I] not in ['0'..'9'] then begin
result:=False;
exit;
end;
end;
i:=strtoint(edit1.text)
except
showmessage('不是数字')
end;
num:=strtoint(edit.text);
except
showmessage('Not number!');
end;
Shift: TShiftState);
begin
if Key in [0..9] then//输入的为数字
begin
.....end;
end;