作者tomex (tomex_ou)
看板C_Sharp
标题Re: [问题] 一个只能打数字的问题
时间Sat Mar 6 20:44:31 2004
※ 引述《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
--
You're recommended to vist C_Sharp in PTT.
We are the C#, resistance is futile.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.119.183.211
※ 编辑: tomex 来自: 140.119.183.211 (03/06 20:59)