NumericUpDownAcceleration NumericUpDownAcceleration NumericUpDownAcceleration 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.

public ref class NumericUpDownAcceleration
public class NumericUpDownAcceleration
type NumericUpDownAcceleration = class
Public Class NumericUpDownAcceleration


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));

Private numericUpDown1 As NumericUpDown

Private Sub 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))

End Sub


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.


NumericUpDownAcceleration(Int32, Decimal) NumericUpDownAcceleration(Int32, Decimal) NumericUpDownAcceleration(Int32, Decimal) NumericUpDownAcceleration(Int32, Decimal)

Initializes a new instance of the NumericUpDownAcceleration class.


Increment Increment Increment Increment

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

Seconds Seconds Seconds Seconds

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


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also