NumericUpDownAcceleration Class
Collapse the table of content
Expand the table of content

NumericUpDownAcceleration Class


Provides information specifying how acceleration should be performed on a spin box (also known as an up-down control) when the up or down button is pressed for specified time period.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)


public class NumericUpDownAcceleration

System_CAPS_pubmethodNumericUpDownAcceleration(Int32, Decimal)

Initializes a new instance of the NumericUpDownAcceleration class.


Gets or sets the quantity to increment or decrement the displayed value during acceleration.


Gets or sets the number of seconds the up or down button must be pressed before the acceleration starts.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

The NumericUpDownAcceleration object is used by the NumericUpDown control to optionally provide acceleration when incrementing or decrementing the control through a large quantity of numbers.

The following code example demonstrates how to use the NumericUpDownAcceleration class. To run this example, paste the following code into a form and call the InitializeAcceleratedUpDown method from the form's constructor or Load event handler. While the code is running, press and hold the up or down arrow to see the acceleration occur.

private NumericUpDown numericUpDown1;
private void InitializeAcceleratedUpDown()
    numericUpDown1 = new NumericUpDown();
    numericUpDown1.Location = new Point(40, 40);
    numericUpDown1.Maximum = 40000;
    numericUpDown1.Minimum = -40000;

    // Add some accelerations to the control.
    numericUpDown1.Accelerations.Add(new NumericUpDownAcceleration(2,100));
    numericUpDown1.Accelerations.Add(new NumericUpDownAcceleration(5, 1000));
    numericUpDown1.Accelerations.Add(new NumericUpDownAcceleration(8, 5000));


.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2015 Microsoft