Article
    C#
    ADO.Net
    .NET
    ASP.Net & Web Forms
    Custom Controls
    Web Development
    Exception Handling
    XML
    Database
    Security in .Net
    Testing
    Web Services
    Windows Services
    Windows Controls
    WCF
    AJAX
    WPF
    XAML
    Reporting
    Setup
    VB.Net
    LINQ
    JQuery
    SilverLight
    JavaScript
    HTML5
    Crystal Report
    Cloud Computing
    Share Point
    Visual C++
    MVC
    Android
    PHP
    Java
    HTML
    WordPress
    Joomla
    Products
    Drupal
    Windows Phone
    JSON
    LightSwitch
    iPhone/iPad
    Ruby on Rails
    IIS 7
    Windows 8
    CSS/CSS3
    Excel
    MS Access
    Shortcut Keys
    Visual SourceSafe
    Team Foundation Server
    APIs
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog

Home >> VB.Net >> NumericUpDown Control in VB.Net
NumericUpDown Control in VB.Net
NumericUpDown Control in VB.Net


by Pushpendra Singh on 12/14/2010 4:34:45 PM

Views: 6279       Comments: 0

NumericUpDown Control in VB.Net

NumericUpDown are basically counters that the user can input a number within the specified range. With the Help of NumericUpDown Control we can enter numeric values, with advanced features like up-down buttons and accelerating auto-repeat.

How to use NumericUpDown Control

Drag and drop NumericUpDown Control from toolbox on window Form.

NumericUpDown Control in VB.Net

Code:

Public Class Form12

    Private Sub NumericUpDown1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumericUpDown1.ValueChanged

        'NumericUpDown valu will show in TextBox

        TextBox1.Text = NumericUpDown1.Value

    End Sub

End Class

 

By Default Maximum and Minimum value in NumericUpDown Control is set 100 and 0 respectively.You can also set Maximum and Minimum value in NumericUpDown Control. To show the value in NumericUpDown.

 

Run the project

 

NumericUpDown Control in VB.Net

When you select the value in NumericUpDown1 then ValueChanged event will fire and selected value will show in the TextBox.

NumericUpDown Control in VB.Net

 NumericUpDown Control Properties

DecimalPlaces:  Gets or sets the number of decimal places to display in NumericUpDown Control.

UpDownAlign:  Set positions the arrow buttons on the left or the right side of the NumericUpDown. Default value is Right.

Increment:  Gets or sets the value to increment or decrement the NumericUpDown.

Private Sub Form12_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'Increment the NumericUpDown value

        NumericUpDown1.Increment = 5

End Sub

NumericUpDown value will be inrement 5 at each up button click.

NumericUpDown Control in VB.Net

Hexadecimal:   Hexadecimal property used to show value in Hexadecimal format in NumericUpDown. Default  value is false.

Private Sub Form12_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        ' allow to show value Hexadecimal format

        NumericUpDown1.Hexadecimal = True

 End Sub

NumericUpDown Control in VB.Net

 

Report Abuse Form
Reason:    
 

Title :
Comment :
Text ColorBackground Color
BoldItalicUnderline
LeftCenterRightJustify
Ordered ListBulleted List
IndentOutdent
Horizontal Rule
SubscriptSuperscript
HyperlinkImage
Design ModeDesign
View HtmlHtml
     
 
Latest Article by Pushpendra SinghRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Latest BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Top Viewed ArticlesRSS Feed
    
    
    
    
    
    
    
    
    
    
Top Viewed BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
Latest Interview QuestionsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Total Online Users: 6702
Advertisement
MindStick SurveyManager
Advertise with Us
  
Copyright © 2009 - 2013MindStick. All Rights Reserved.