求助:限制edit之类的文本框只能输入数字的方法?
解决方案 »
- 局域网扫描问题
- 赋初始值时出错帮我看看
- delphi调用C++BUILDER编写的DLL时这个函数调用(在线等)?
- tdxTreeList v4.0 for D7的哪里下载...
- 用Delphi做多线程程序?
- 关于DBExpress 不知道是不是DELPHI的问题,真心求教
- 关于installshell的问题:
- 导入数据时,如果原数据存在,将结果插入临时表,如何实现
- 列位同仁有没有使用Delphi程序将SQL SERVER 中的数据倒入Access中,怎么做?
- delphi中有像VB的MsgBox这样的函数吗
- 关于微软的慢火煮青蛙
- 请问如何在 directX 的游戏中获取屏幕上某一点的颜色值?
IsNumeric: Boolean; var Key: Char);
procedure DoErr;
begin
Key := #0;
MessageBeep(1);
end;
begin
if Key = #8 then Exit;
if Len > 0 then
begin
if AEditControl.SelLength > 0 then Exit;
if Length(AEditControl.Text) > Len-1 then
begin
DoErr;
Exit;
end;
end;
if IsNumeric then if not (Key in ['0'..'9', #8]) then
begin
DoErr;
Exit;
end;
end;_____________________
http://lysoft.7u7.net
begin
EditContentRestriction(Sender as TCustomEdit, 20, True, Key);
end;_____________________
http://lysoft.7u7.net
begin
if not (key in ['0'..'9',#8]) then
key := #0;
end;
begin
if not (Key in ['0'..'9', '.', #8, #46]) then
Key := #0;
end;
or ES_NUMBER);
begin
if not (key in ['0'..'9',#8]) then
key := #0;
end;