作者tomex (tomex_ou)
看板C_Sharp
标题Re: [问题] 一个只能打数字的问题
时间Tue Mar 9 15:10:56 2004
※ 引述《tomex (tomex_ou)》之铭言:
: ※ 引述《ghost777 (飘雪)》之铭言:
: : 我是想让使用者在textbox输入时
: : 只能输入数字和倒退
: : 就是在textbox的keypress事件里
: : 先判断使用者键入何键
: : 如果是数字0~9和backspace以外的
: : 就不动作
: : 试了许久试不出来=.="
: Try to write the rule in KeyDown() event of TextBox,
: but the point is how to modify the read-only KeyChar.
: ??? :D
另外,这让我想到之前的讨论,目前.net还无法把keyin的字元留住而显示出console
等待.net 2.0 (Long Horn Project)的释出,应该就完善多了...
你不觉得目前的winform的control还有点少吗? 没有vb那麽rich... :p
--
You're recommended to vist C_Sharp in PTT.
We are the C#, resistance is futile.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.119.183.211