如题~~~谢谢~~~
解决方案 »
- 我与Delphi
- 用FASTREPORT做报表,你们的网格线都是怎么做的啊,不会是划的网格吧?
- 求几个控件名ExPressDBTree 1.31,QuantumGrid 3.22 ,ReportBuilder 7.03这三个控件我在网上找了很久,却没找到,
- 如何判断输入的字符串是否为两个字母加四个数字?
- 发了N个贴了还没解决:我要把当前的日期时间 Now 加上30分钟之后的时间显示在一个DateTimePicker 控件上,怎么办?
- 如何绕过135端口访问服务器上的COM+?
- 中国P2P联盟招人啦
- 請教,BDE問題:"Corrupt file-other than header"
- access下,为什么执行adoquery1.insert后,所增加的记录是在数据库的最后呢?(在线等待)
- 如何向其它应用程序发送普通键及组合键?
- 改名了,改名了,以后大家叫我阿三就行了,呵呵
- 请教Double如何取个位的值??
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if (Key in ['0'..'9']) then
Key := Chr(0);
end;
begin
if (Key in ['0'..'9']) then Key := Chr(0);
end;
反着写就可以了
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if (key in ['a'..'z','A'..'Z']) then key := key
else
key := chr(0);
end;
注:繁体字未试procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if not (key in ['a'..'z','A'..'Z',#8,#126..#255]) then key := chr(0);
end;