NumericUpDownAcceleration NumericUpDownAcceleration NumericUpDownAcceleration NumericUpDownAcceleration Class


提供信息,指定当按下上移按钮或下移按钮持续指定的时间后应如何对数字显示框(也称为 up-down 控件)执行加速。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


下面的代码示例演示如何使用NumericUpDownAcceleration类。The following code example demonstrates how to use the NumericUpDownAcceleration class. 若要运行此示例, 请将以下代码粘贴到窗体中InitializeAcceleratedUpDown , 并从窗体的构造Load函数或事件处理程序调用方法。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


控件使用NumericUpDown对象, 以便在通过大量数字递增或递减控件时提供加速。 NumericUpDownAccelerationThe 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)

初始化 NumericUpDownAcceleration 类的新实例。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()

获取当前实例的 TypeGets the Type of the current instance.

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

创建当前 Object 的浅表副本。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)