Z zw84611 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-19 #3 在FormCreate中加一句: SetWindowLong(Edit1.Handle, GWL_STYLE,GetWindowLong(Edit1.Handle, GWL_STYLE) or ES_NUMBER);
在FormCreate中加一句: SetWindowLong(Edit1.Handle, GWL_STYLE,GetWindowLong(Edit1.Handle, GWL_STYLE) or ES_NUMBER);
L lcl_003 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-19 #4 keypress事件里 if not (key in ['0'..'9']) then key:=#0;
P pt_email Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-19 #5 参考 http://www.delphibbs.com/delphibbs/dispq.asp?lid=1410308
崔 崔占东 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-19 #6 在ONKEYPRESS事件中加入 if key not in ('0'..'9') then exit;
B Bruce Yu Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-19 #7 来晚了.只有说同意的份 在ONKEYPRESS中 if not (key in ['0'..'9']) then key := #0;
银 银雨辰 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-19 #8 try key in ['0'..'9']; except key := #0; end;
C china2k Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-26 #9 我也来晚了,同意lcl_003的方法,我就是用这个方法,不过还要补充一点,程序如下: 在Edit的Onkeypress事件里 if not (Key in ['0'..'9', #13, #8]) then Key := #0; 要不然按删除键和回车键都会无效。
我也来晚了,同意lcl_003的方法,我就是用这个方法,不过还要补充一点,程序如下: 在Edit的Onkeypress事件里 if not (Key in ['0'..'9', #13, #8]) then Key := #0; 要不然按删除键和回车键都会无效。
H HeBaisong Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-26 #10 if not (Key in ['0'..'9', #13, #8]) then Key := #0;
C cljhyjs Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-26 #11 在FormCreate中加一句: SetWindowLong(Edit1.Handle, GWL_STYLE,GetWindowLong(Edit1.Handle, GWL_STYLE) or ES_NUMBER); 这才是真正的上策!!!
在FormCreate中加一句: SetWindowLong(Edit1.Handle, GWL_STYLE,GetWindowLong(Edit1.Handle, GWL_STYLE) or ES_NUMBER); 这才是真正的上策!!!
C chinaluo Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-26 #12 在 keypress事件里 if not (key in ['0'..'9']) then key:=#0;