Windows Forms 2.0 – The NumericUpDown Control

Posted by: Suprotim Agarwal , on 3/22/2007, in Category WinForms & WinRT
Views: 17910
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.


This article has been editorially reviewed by Suprotim Agarwal.

Absolutely Awesome Book on C# and .NET

C# and .NET have been around for a very long time, but their constant growth means there’s always more to learn.

We at DotNetCurry are very excited to announce The Absolutely Awesome Book on C# and .NET. This is a 500 pages concise technical eBook available in PDF, ePub (iPad), and Mobi (Kindle).

Organized around concepts, this Book aims to provide a concise, yet solid foundation in C# and .NET, covering C# 6.0, C# 7.0 and .NET Core, with chapters on the latest .NET Core 3.0, .NET Standard and C# 8.0 (final release) too. Use these concepts to deepen your existing knowledge of C# and .NET, to have a solid grasp of the latest in C# and .NET OR to crack your next .NET Interview.

Click here to Explore the Table of Contents or Download Sample Chapters!

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 The Absolutely Awesome jQuery CookBook.

Suprotim has received the prestigious Microsoft MVP award for ten consecutive times. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that offers Digital Marketing and Branding services to businesses, both in a start-up and enterprise environment.

Get in touch with him on Twitter @suprotimagarwal or at LinkedIn

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