English 中文(简体)
在2010年VB .net设定最低和最高数值
原标题:Setting minimum and maximum values of text box in VB .net 2010

我想在案文箱中设置minValue,以便为验证目的界定一系列可接受的价值。

在VB 6中,这是直截了当的,可以在文字箱内进行,然而,在视觉演播室诉2010年网中,情况并非如此,或者可能出现一个没有东西的情况。

Thanks, Ayub

最佳回答

在WinForms,你可以使用一种NumericUpDown控制,拥有最低和最高财产。

问题回答

你们需要的是按特性对数字文字进行控制。 AFAIKMS不提供一种解决办法,但可免费找到解决办法,例如:

http://www.codeproject.com/KB/edit/HDNumericTextBox.aspx

制作一个定制的文本箱——检查输入值的正文,并将价值限制在数字上,例如——与文字箱中的关键数字或主要压缩事件相配合,并捕获关键编码或事件发件。

Try using the RangeValidator





相关问题
Bring window to foreground after Mutex fails

I was wondering if someone can tell me what would be the best way to bring my application to the foreground if a mutex was not able to be created for a new instance. E.g.: Application X is running ...

How to start WinForm app minimized to tray?

I ve successfully created an app that minimizes to the tray using a NotifyIcon. When the form is manually closed it is successfully hidden from the desktop, taskbar, and alt-tab. The problem occurs ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

Handle DataTable.DataRow cell change event

I have a DataTable that has several DataColumns and DataRow. Now i would like to handle an event when cell of this DataRow is changed. How to do this in c#?

Apparent Memory Leak in DataGridView

How do you force a DataGridView to release its reference to a bound DataSet? We have a rather large dataset being displayed in a DataGridView and noticed that resources were not being freed after the ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

WPF-XAML window in Winforms Application

I have a Winforms application coded in VS C# 2008 and want to insert a WPF window into the window pane of Winforms application. Could you explain me how this is done.