The NumericUpDown control lets the user enter and edit numeric values. You can set the minimum and maximum values as well as the step change made when the spinner is used. The value of the control can also be set by commands from a connected device.

The NumericUpDown control is a Decimal value, even if you set the number of decimal places to zero.

Design-time Properties for the NumericUpDown control
Property Description
Value The current value of control
Minimum Sets the minimum value of the control
Maximum Sets the maximum value of the control
Increment The amount to increment or decrement the value on each button click
Hexadecimal Indicates whether the control should display its value in hexadecimal
DecimalPlaces The number of decimal places to display
ThousandsSeparator Indicates whether the system thousands separator (commonly ‘,’, ‘.’ or ‘ ‘) will be inserted between every three decimal digits
UpDownAlign Sets whether the spinner is shown on the left or right side of the control
ReadOnly If true, the user can’t edit the control’s value
Run-time Properties for the NumericUpDown control
Name Access Type Description
Name Read only string The name of the control
Value Read/write Decimal The current value
DoubleValue Read/write double Gets/sets the current control value as a Double. This can be more convenient for mathematical operations than the Decimal returned by the Value property
Minimum Read/write Decimal Gets/sets the minimum control value
Maximum Read/write Decimal Gets/sets the maximumcontrol value

This control also supports all the common run-time properties.

Start typing and press Enter to search