Windows Forms 2.0 – The NumericUpDown Control

Posted by: Suprotim Agarwal , on 3/22/2007, in Category WinForms & WinRT
Views: 16551
Abstract: In this article, we will explore and get started with the NumericUpDown Control of Windows Forms 2.0.

Windows Forms 2.0 – The NumericUpDown Control


The NumericUpDown control allows the user to select a number that falls between a minimum and a maximum value. The NumericUpDown control primarily contains four integer properties: Minimum, Maximum, Value, and Increment.



How Do I Get Started With The NumericUpDown Control


The Minimum and Maximum properties allows you to specify the range of values for the control.The Increment value specifies the value to be incremented or decremented to the Value property when the user clicks the up or down arrow buttons. You can also control the speed of the control as it moves through numbers when the user presses the up or down arrow by setting the Accelerations property.



private void CreateNumericUpDown()




numericUpDown = new NumericUpDown();



// Set the Minimum, Maximum, and initial Value.


numericUpDown.Value = 0;


numericUpDown.Maximum = 220;


numericUpDown.Minimum = 0;









Note: You can configure how values are displayed in the Windows Forms NumericUpDown control. The DecimalPlaces property determines how many numbers appear after the decimal point; the default is 0. The ThousandsSeparator property determines whether a separator will be inserted between every three decimal digits; the default is false.


Conclusion :


In this article, we took a quick overview of getting started  with the NumericUpDown Control. I hope the article was useful and I thank you for viewing it.


What Others Are Reading!
Was this article worth reading? Share it with fellow developers too. Thanks!
Share on LinkedIn
Share on Google+

Suprotim Agarwal, MCSD, MCAD, MCDBA, MCSE, is the founder of DotNetCurry, DNC Magazine for Developers, SQLServerCurry and DevCurry. He has also authored a couple of books 51 Recipes using jQuery with ASP.NET Controls and a new one recently at The Absolutely Awesome jQuery CookBook.

Suprotim has received the prestigious Microsoft MVP award for nine times in a row now. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that represents premium web sites and digital publications comprising of Professional web, windows, mobile and cloud developers, technical managers, and architects.

Get in touch with him on Twitter @suprotimagarwal, LinkedIn or befriend him on Facebook

Page copy protected against web site content infringement 	by Copyscape

Feedback - Leave us some adulation, criticism and everything in between!
Comment posted by Priya on Tuesday, September 9, 2008 5:09 AM
I need similar control for web form can any one help.
Comment posted by tr f on Tuesday, April 5, 2011 7:55 AM





Free DNC .NET Magazine



jQuery CookBook