如何使用文本框输入获取VB.NET 2012中数字的百分比值?
问题描述:
例如:
4%= blah blah
2.5%=等等等等
2,500 * 2.5 %= blah blah
,值2,500将在文本框中输入,2.5%将自动乘以输入。
我尝试了什么:
尚未尝试任何东西。我只想先问一下,因为我要开始我们的顶点项目。
提前谢谢!
For example:
4% = blah blah
2.5% = blah blah
2,500 * 2.5% = blah blah
and the values 2,500 will be inputted in textbox and 2.5% will be automatically multiplied to the input.
What I have tried:
not yet tried anything. I just want to ask first because I'm going to start our capstone project.
Thanks in advance!
答
MaskedTextBox类(System.Windows。表格) [ ^ ]
MaskedTextBox.Mask属性(System.Windows.Forms) [ ^ ]
Percentage = 2500 * .025; // 2.5 / 100