procedure TForm1.Edt_NumKeyPress(Sender: TObject; var Key: Char);   
begin   
If 
not (key in [#48..#57]) then   
begin    
key:
= #0;   
ShowMessage(
'只能输入数字');   
end   
end;  

 

刚遇到这个问题就发上来了 这个".."真好用啊

记住在你的edit编辑框里面在KeyPress里面加入代码哦!

posted on 2010-09-20 20:39  °ι 、曲 终  阅读(212)  评论(0)    收藏  举报