需要数字文本框 [英] Numeric textbox required

查看:48
本文介绍了需要数字文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要C#中的代码来制作仅接受数字的文本框? plz.

i need the code in C# to make a textbox which accepts only numbers???
plz.

推荐答案

您是否正在为愚蠢的人参加比赛?您的名字如何成为有用的主题行?为什么Google在您居住的地方不起作用?
Are you entering a contest for stupid people ? How is your name a useful subject line ? Why is it that google does not work where you live ? Any of these[^] hits will do fine, I am sure.


您可以使用<


处理文本框的TextChanged事件,并消除TextBox.Text属性中不是数字的任何内容.
Handle the TextChanged event for the textbox, and eliminate anything in the TextBox.Text property that''s not a numeric digit.


这篇关于需要数字文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆