NumericUpDown 类 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示显示数值的 Windows 数字显示框(也称作 up-down 控件)。
public ref class NumericUpDown : System::Windows::Forms::UpDownBase, System::ComponentModel::ISupportInitializepublic class NumericUpDown : System.Windows.Forms.UpDownBase, System.ComponentModel.ISupportInitialize[System.ComponentModel.DefaultBindingProperty("Value")]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class NumericUpDown : System.Windows.Forms.UpDownBase, System.ComponentModel.ISupportInitialize[System.ComponentModel.DefaultBindingProperty("Value")]
public class NumericUpDown : System.Windows.Forms.UpDownBase, System.ComponentModel.ISupportInitializetype NumericUpDown = class
    inherit UpDownBase
    interface ISupportInitialize[<System.ComponentModel.DefaultBindingProperty("Value")>]
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type NumericUpDown = class
    inherit UpDownBase
    interface ISupportInitialize[<System.ComponentModel.DefaultBindingProperty("Value")>]
type NumericUpDown = class
    inherit UpDownBase
    interface ISupportInitializePublic Class NumericUpDown
Inherits UpDownBase
Implements ISupportInitialize- 继承
- 属性
- 实现
示例
下面的代码示例创建并初始化控件 NumericUpDown ,设置其一些常见属性,并允许用户在运行时更改其中一些属性。 此代码假定已将三 CheckBox 个控件放置在窗体上,并且已实例化其 Click 事件的处理程序。 、 DecimalPlacesThousandsSeparator和 Hexadecimal 属性在每个检查框的事件上Click设置。
public:
   void InstantiateMyNumericUpDown()
   {
      // Create and initialize a NumericUpDown control.
      numericUpDown1 = gcnew NumericUpDown;
      
      // Dock the control to the top of the form.
      numericUpDown1->Dock = System::Windows::Forms::DockStyle::Top;
      
      // Set the Minimum, Maximum, and initial Value.
      numericUpDown1->Value = 5;
      numericUpDown1->Maximum = 2500;
      numericUpDown1->Minimum = -100;
      
      // Add the NumericUpDown to the Form.
      Controls->Add( numericUpDown1 );
   }
private:
   // Check box to toggle decimal places to be displayed.
   void checkBox1_Click( Object^ sender, EventArgs^ e )
   {
      /* If DecimalPlaces is greater than 0, set them to 0 and round the 
         current Value; otherwise, set DecimalPlaces to 2 and change the 
         Increment to 0.25. */
      if ( numericUpDown1->DecimalPlaces > 0 )
      {
         numericUpDown1->DecimalPlaces = 0;
         numericUpDown1->Value = Decimal::Round( numericUpDown1->Value, 0 );
      }
      else
      {
         numericUpDown1->DecimalPlaces = 2;
         numericUpDown1->Increment = Decimal(0.25);
      }
   }
   // Check box to toggle thousands separators to be displayed.
   void checkBox2_Click( Object^ sender, EventArgs^ e )
   {
      /* If ThousandsSeparator is true, set it to false; 
         otherwise, set it to true. */
      if ( numericUpDown1->ThousandsSeparator )
      {
         numericUpDown1->ThousandsSeparator = false;
      }
      else
      {
         numericUpDown1->ThousandsSeparator = true;
      }
   }
   // Check box to toggle hexadecimal to be displayed.
   void checkBox3_Click( Object^ sender, EventArgs^ e )
   {
      /* If Hexadecimal is true, set it to false; 
         otherwise, set it to true. */
      if ( numericUpDown1->Hexadecimal )
      {
         numericUpDown1->Hexadecimal = false;
      }
      else
      {
         numericUpDown1->Hexadecimal = true;
      }
   }
public void InstantiateMyNumericUpDown()
{
   // Create and initialize a NumericUpDown control.
   numericUpDown1 = new NumericUpDown();
   // Dock the control to the top of the form.
   numericUpDown1.Dock = System.Windows.Forms.DockStyle.Top;
   // Set the Minimum, Maximum, and initial Value.
   numericUpDown1.Value = 5;
   numericUpDown1.Maximum = 2500;
   numericUpDown1.Minimum = -100;
   
   // Add the NumericUpDown to the Form.
   Controls.Add(numericUpDown1);
}
// Check box to toggle decimal places to be displayed.
private void checkBox1_Click(Object sender,
                             EventArgs e)
{
   /* If DecimalPlaces is greater than 0, set them to 0 and round the 
      current Value; otherwise, set DecimalPlaces to 2 and change the 
      Increment to 0.25. */
   if (numericUpDown1.DecimalPlaces > 0)
   {
      numericUpDown1.DecimalPlaces = 0;
      numericUpDown1.Value = Decimal.Round(numericUpDown1.Value, 0);
   }
   else
   {
      numericUpDown1.DecimalPlaces = 2;
      numericUpDown1.Increment = 0.25M;
   }
}
// Check box to toggle thousands separators to be displayed.
private void checkBox2_Click(Object sender,
                             EventArgs e)
{   
   /* If ThousandsSeparator is true, set it to false; 
      otherwise, set it to true. */
   if (numericUpDown1.ThousandsSeparator)
   {
      numericUpDown1.ThousandsSeparator = false;
   }
   else
   {
      numericUpDown1.ThousandsSeparator = true;
   }
}
// Check box to toggle hexadecimal to be displayed.
private void checkBox3_Click(Object sender, 
                             EventArgs e)
{
   /* If Hexadecimal is true, set it to false; 
      otherwise, set it to true. */    
   if (numericUpDown1.Hexadecimal)
   {
      numericUpDown1.Hexadecimal = false;
   }
   else
   {
      numericUpDown1.Hexadecimal = true;
   }
}
Public Sub InstantiateMyNumericUpDown()
    ' Create and initialize a NumericUpDown control.
    numericUpDown1 = New NumericUpDown()
    
    ' Dock the control to the top of the form.
    numericUpDown1.Dock = System.Windows.Forms.DockStyle.Top
    
    ' Set the Minimum, Maximum, and initial Value.
    numericUpDown1.Value = 5
    numericUpDown1.Maximum = 2500
    numericUpDown1.Minimum = - 100
    
    ' Add the NumericUpDown to the Form.
    Controls.Add(numericUpDown1)
End Sub    
' Check box to toggle decimal places to be displayed.
Private Sub checkBox1_Click(sender As Object, e As EventArgs)
    ' If DecimalPlaces is greater than 0, set them to 0 and round the
    ' current Value; otherwise, set DecimalPlaces to 2 and change the
    ' Increment to 0.25. 
    If numericUpDown1.DecimalPlaces > 0 Then
        numericUpDown1.DecimalPlaces = 0
        numericUpDown1.Value = Decimal.Round(numericUpDown1.Value, 0)
    Else
        numericUpDown1.DecimalPlaces = 2
        numericUpDown1.Increment = 0.25D
    End If
End Sub    
' Check box to toggle thousands separators to be displayed.
Private Sub checkBox2_Click(sender As Object, e As EventArgs)
    ' If ThousandsSeparator is true, set it to false;
    ' otherwise, set it to true. 
    If numericUpDown1.ThousandsSeparator Then
        numericUpDown1.ThousandsSeparator = False
    Else
        numericUpDown1.ThousandsSeparator = True
    End If
End Sub    
' Check box to toggle hexadecimal to be displayed.
Private Sub checkBox3_Click(sender As Object, e As EventArgs)
    ' If Hexadecimal is true, set it to false;
    ' otherwise, set it to true. 
    If numericUpDown1.Hexadecimal Then
        numericUpDown1.Hexadecimal = False
    Else
        numericUpDown1.Hexadecimal = True
    End If
End Sub
注解
控件 NumericUpDown 包含一个数值,可通过单击控件的向上或向下按钮递增或递减。 用户还可以输入值,除非 ReadOnly 属性设置为 true。
可以通过设置 、 Hexadecimal或 ThousandsSeparator 属性来DecimalPlaces设置数字显示的格式。 若要在 控件中显示十六进制值,请将 Hexadecimal 属性设置为 true。 若要在适当时以小数显示千位分隔符,请将 属性设置为 ThousandsSeparatortrue。 若要指定小数符号后显示的位数,请将 属性设置为 DecimalPlaces 要显示的小数位数。
若要为控件指定允许的值范围,请设置 Minimum 和 Maximum 属性。 Increment设置 值以指定要在用户单击向上或向下箭头按钮时递增或递减到 Value 属性的值。 当用户连续按向上或向下箭头时,可以通过设置 Accelerations 属性来提高控件在数字中移动的速度。
              UpButton在代码中或通过单击向上或向下按钮调用 或 DownButton 方法时,将验证新值,并使用相应格式的新值更新控件。 具体而言,如果 属性 UserEdit 设置为 true,则会在 ParseEditText 验证或更新值之前调用 方法。 然后验证该值是否在 和 Maximum 值之间Minimum,并UpdateEditText调用 方法。
从 .NET Framework 4.6 开始,NumericUpDown当 app.config 文件包含以下条目时,将根据系统 DPI 设置调整控件的大小:
<appSettings>  
  <add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />  
</appSettings>  
构造函数
| NumericUpDown() | 初始化 NumericUpDown 类的新实例。 | 
字段
| ScrollStateAutoScrolling | 确定 AutoScroll 属性的值。(继承自 ScrollableControl) | 
| ScrollStateFullDrag | 确定用户是否启用了全窗口拖动。(继承自 ScrollableControl) | 
| ScrollStateHScrollVisible | 确定 HScroll 属性的值是否设置为  | 
| ScrollStateUserHasScrolled | 确定用户是否滚动了 ScrollableControl 控件。(继承自 ScrollableControl) | 
| ScrollStateVScrollVisible | 确定 VScroll 属性的值是否设置为  | 
属性
| Accelerations | 获取存储的 NumericUpDown 控件的加速对象的集合。 | 
| AccessibilityObject | 获取分配给该控件的 AccessibleObject。(继承自 Control) | 
| AccessibleDefaultActionDescription | 获取或设置控件的默认操作说明以供具有辅助功能的客户端应用程序使用。(继承自 Control) | 
| AccessibleDescription | 获取或设置辅助功能客户端应用程序使用的控件说明。(继承自 Control) | 
| AccessibleName | 获取或设置辅助功能客户端应用程序所使用的控件名称。(继承自 Control) | 
| AccessibleRole | 获取或设置控件的辅助性角色。(继承自 Control) | 
| ActiveControl | 获取或设置容器控件上的活动控件。(继承自 ContainerControl) | 
| AllowDrop | 获取或设置一个值,该值指示控件是否可以接受用户拖放到它上面的数据。(继承自 Control) | 
| Anchor | 获取或设置控件绑定到的容器的边缘并确定控件如何随其父级一起调整大小。(继承自 Control) | 
| AutoScaleDimensions | 获取或设置控件的设计尺寸。(继承自 ContainerControl) | 
| AutoScaleFactor | 获取当前和设计时自动缩放尺寸之间的缩放因子。(继承自 ContainerControl) | 
| AutoScaleMode | 获取或设置控件的自动缩放模式。(继承自 ContainerControl) | 
| AutoScroll | 获取一个值,该值指示容器是否允许用户滚动到任何放置在它的可视边界之外的控件。(继承自 UpDownBase) | 
| AutoScrollMargin | 获取或设置自动滚动边距的大小。(继承自 UpDownBase) | 
| AutoScrollMinSize | 获取或设置自动滚动区域的最小大小。(继承自 UpDownBase) | 
| AutoScrollOffset | 获取或设置一个值,该值指示在 ScrollControlIntoView(Control) 中将控件滚动到何处。(继承自 Control) | 
| AutoScrollPosition | 获取或设置自动滚动定位的位置。(继承自 ScrollableControl) | 
| AutoSize | 获取或设置一个值,该值指示是否应根据控件的内容自动调整控件的大小。(继承自 UpDownBase) | 
| AutoValidate | 获取或设置一个值,该值指示当焦点更改时是否自动验证此容器内的控件。(继承自 ContainerControl) | 
| BackColor | 获取或设置数字显示框(也称为 up-down 控件)的文本框部分的背景色。(继承自 UpDownBase) | 
| BackgroundImage | 获取或设置 UpDownBase 的背景图像。(继承自 UpDownBase) | 
| BackgroundImageLayout | 获取或设置 BackgroundImage 的 UpDownBase 的布局。(继承自 UpDownBase) | 
| BindingContext | 获取或设置控件的 BindingContext。(继承自 ContainerControl) | 
| BorderStyle | 获取或设置数字显示框(也称为 up-down 控件)的边框样式。(继承自 UpDownBase) | 
| Bottom | 获取控件下边缘与其容器的工作区上边缘之间的距离(以像素为单位)。(继承自 Control) | 
| Bounds | 获取或设置控件(包括其非工作区元素)相对于其父控件的大小和位置(以像素为单位)。(继承自 Control) | 
| CanEnableIme | 获取一个用以指示是否可以将 ImeMode 属性设置为活动值的值,以启用 IME 支持。(继承自 ContainerControl) | 
| CanFocus | 获取一个值,该值指示控件是否可以接收焦点。(继承自 Control) | 
| CanRaiseEvents | 确定是否可以在控件上引发事件。(继承自 Control) | 
| CanSelect | 获取一个值,该值指示是否可以选中控件。(继承自 Control) | 
| Capture | 获取或设置一个值,该值指示控件是否已捕获鼠标。(继承自 Control) | 
| CausesValidation | 获取或设置一个值,该值指示控件是否会引起在任何需要在接收焦点时执行验证的控件上执行验证。(继承自 Control) | 
| ChangingText | 获取或设置一个值,该值指示文本属性是否由其父类内部更改。(继承自 UpDownBase) | 
| ClientRectangle | 获取表示控件的工作区的矩形。(继承自 Control) | 
| ClientSize | 获取或设置控件的工作区的高度和宽度。(继承自 Control) | 
| CompanyName | 获取包含控件的应用程序的公司名称或创建者。(继承自 Control) | 
| Container | 获取包含 IContainer 的 Component。(继承自 Component) | 
| ContainsFocus | 获取一个值,该值指示控件或它的一个子控件当前是否有输入焦点。(继承自 Control) | 
| ContextMenu | 获取或设置与数字显示框(也称为 up-down 控件)关联的快捷菜单。(继承自 UpDownBase) | 
| ContextMenuStrip | 获取或设置数字显示框(也称为 up-down 控件)的快捷菜单。(继承自 UpDownBase) | 
| Controls | 获取包含在控件内的控件的集合。(继承自 Control) | 
| Created | 获取一个值,该值指示控件是否已经创建。(继承自 Control) | 
| CreateParams | 获取创建控件句柄时所需要的创建参数。(继承自 UpDownBase) | 
| CurrentAutoScaleDimensions | 获取屏幕的当前运行时尺寸。(继承自 ContainerControl) | 
| Cursor | 获取或设置当鼠标指针位于控件上时显示的光标。(继承自 Control) | 
| DataBindings | 为该控件获取数据绑定。(继承自 Control) | 
| DataContext | 获取或设置用于数据绑定的数据上下文。 这是一个环境属性。(继承自 Control) | 
| DecimalPlaces | 获取或设置数字显示框(也称作 up-down 控件)中要显示的十进制位数。 此属性不会影响 Value 属性。 | 
| DefaultCursor | 获取或设置控件的默认光标。(继承自 Control) | 
| DefaultImeMode | 获取控件支持的默认输入法编辑器 (IME) 模式。(继承自 Control) | 
| DefaultMargin | 获取控件之间默认指定的间距(以像素为单位)。(继承自 Control) | 
| DefaultMaximumSize | 获取以像素为单位的长度和高度,此长度和高度被指定为控件的默认最大大小。(继承自 Control) | 
| DefaultMinimumSize | 获取以像素为单位的长度和高度,此长度和高度被指定为控件的默认最小大小。(继承自 Control) | 
| DefaultPadding | 获取控件内容的默认内部间距(以像素为单位)。(继承自 Control) | 
| DefaultSize | 获取控件的默认大小。(继承自 UpDownBase) | 
| DesignMode | 获取一个值,用以指示 Component 当前是否处于设计模式。(继承自 Component) | 
| DeviceDpi | 获取显示当前控件的显示设备的 DPI 值。(继承自 Control) | 
| DisplayRectangle | 获取表示控件的虚拟显示区域的矩形。(继承自 ScrollableControl) | 
| Disposing | 获取一个值,该值指示 Control 基类是否在释放进程中。(继承自 Control) | 
| Dock | 获取或设置哪些控件边框停靠到其父控件并确定控件如何随其父级一起调整大小。(继承自 Control) | 
| DockPadding | 获取 UpDownBase 控件所有边缘的停靠边距设置。(继承自 UpDownBase) | 
| DoubleBuffered | 获取或设置一个值,该值指示此控件是否应使用辅助缓冲区重绘其图面,以减少或避免闪烁。(继承自 Control) | 
| Enabled | 获取或设置一个值,该值指示控件是否可以对用户交互作出响应。(继承自 Control) | 
| Events | 获取附加到此 Component 的事件处理程序的列表。(继承自 Component) | 
| Focused | 获取一个值,该值指示控件是否有输入焦点。(继承自 UpDownBase) | 
| Font | 获取或设置控件显示的文字的字体。(继承自 Control) | 
| FontHeight | 获取或设置控件的字体的高度。(继承自 Control) | 
| ForeColor | 获取或设置数字显示框(也称为 up-down 控件)的前景色。(继承自 UpDownBase) | 
| Handle | 获取控件绑定到的窗口句柄。(继承自 Control) | 
| HasChildren | 获取一个值,该值指示控件是否包含一个或多个子控件。(继承自 Control) | 
| Height | 获取或设置控件的高度。(继承自 Control) | 
| Hexadecimal | 获取或设置一个值,该值指示数字显示框(也称作 up-down 控件)是否以十六进制格式显示所包含的值。 | 
| HorizontalScroll | 获取与水平滚动条关联的特征。(继承自 ScrollableControl) | 
| HScroll | 获取或设置一个值,该值指示水平滚动条是否可见。(继承自 ScrollableControl) | 
| ImeMode | 获取或设置控件的输入法编辑器 (IME) 模式。(继承自 Control) | 
| ImeModeBase | 获取或设置控件的 IME 模式。(继承自 Control) | 
| Increment | 获取或设置单击向上或向下按钮时,数字显示框(也称作 up-down 控件)递增或递减的值。 | 
| InterceptArrowKeys | 获取或设置一个值,该值指示用户是否可以使用向上键和向下键选择值。(继承自 UpDownBase) | 
| InvokeRequired | 获取一个值,该值指示调用方在对控件进行方法调用时是否必须调用 Invoke 方法,因为调用方位于创建控件所在的线程以外的线程中。(继承自 Control) | 
| IsAccessible | 获取或设置一个值,该值指示控件对辅助功能应用程序是否可见。(继承自 Control) | 
| IsAncestorSiteInDesignMode | 指示此控件的上级之一是否位于 DesignMode 中。 此属性为只读。(继承自 Control) | 
| IsDisposed | 获取一个值,该值指示控件是否已经被释放。(继承自 Control) | 
| IsHandleCreated | 获取一个值,该值指示控件是否有与它关联的句柄。(继承自 Control) | 
| IsMirrored | 获取一个值,该值指示此控件是否为镜像控件。(继承自 Control) | 
| LayoutEngine | 获取控件的布局引擎的缓存实例。(继承自 Control) | 
| Left | 获取或设置控件左边缘与其容器的工作区左边缘之间的距离(以像素为单位)。(继承自 Control) | 
| Location | 获取或设置该控件的左上角相对于其容器的左上角的坐标。(继承自 Control) | 
| Margin | 获取或设置控件之间的空间。(继承自 Control) | 
| Maximum | 获取或设置数字显示框(也称作 up-down 控件)的最大值。 | 
| MaximumSize | 获取或设置数字显示框(也称为 up-down 控件)的最大大小。(继承自 UpDownBase) | 
| Minimum | 获取或设置数字显示框(也称作 up-down 控件)的最小允许值。 | 
| MinimumSize | 获取或设置数字显示框(也称为 up-down 控件)的最小大小。(继承自 UpDownBase) | 
| Name | 获取或设置控件的名称。(继承自 Control) | 
| Padding | 获取或设置 NumericUpDown 控件的边缘及其内容之间的间距。 | 
| Padding | 获取或设置控件内的空白。(继承自 Control) | 
| Parent | 获取或设置控件的父容器。(继承自 Control) | 
| ParentForm | 获取将容器控件分配给的窗体。(继承自 ContainerControl) | 
| PreferredHeight | 获取数字显示框(也称为 up-down 控件)的高度。(继承自 UpDownBase) | 
| PreferredSize | 获取可以容纳控件的矩形区域的大小。(继承自 Control) | 
| ProductName | 获取包含控件的程序集的产品名称。(继承自 Control) | 
| ProductVersion | 获取包含控件的程序集的版本。(继承自 Control) | 
| ReadOnly | 获取或设置一个值,该值指示是否只能使用向上或向下按钮更改文本。(继承自 UpDownBase) | 
| RecreatingHandle | 获取一个值,该值指示控件当前是否在重新创建其句柄。(继承自 Control) | 
| Region | 获取或设置与控件关联的窗口区域。(继承自 Control) | 
| RenderRightToLeft | 
		已过时.
	 
		已过时.
	 此属性现已过时。(继承自 Control) | 
| ResizeRedraw | 获取或设置一个值,该值指示控件在调整大小时是否重绘自己。(继承自 Control) | 
| Right | 获取控件右边缘与其容器的工作区左边缘之间的距离(以像素为单位)。(继承自 Control) | 
| RightToLeft | 获取或设置一个值,该值指示是否将控件的元素对齐以支持使用从右向左的字体的区域设置。(继承自 Control) | 
| ScaleChildren | 获取一个值,该值确定子控件的缩放。(继承自 Control) | 
| ShowFocusCues | 获取一个值,该值指示控件是否应显示聚焦框。(继承自 Control) | 
| ShowKeyboardCues | 获取一个值,该值指示用户界面是否处于适当的状态以显示或隐藏键盘快捷键。(继承自 Control) | 
| Site | 获取或设置控件的站点。(继承自 Control) | 
| Size | 获取或设置控件的高度和宽度。(继承自 Control) | 
| TabIndex | 获取或设置控件在其容器内的 Tab 键顺序。(继承自 Control) | 
| TabStop | 获取或设置一个值,该值指示用户能否使用 Tab 键将焦点放到该控件上。(继承自 Control) | 
| Tag | 获取或设置包含有关控件的数据的对象。(继承自 Control) | 
| Text | 获取或设置要在 NumericUpDown 控件中显示的文本。 | 
| TextAlign | 获取或设置数字显示框(也称为 up-down 控件)中文本的对齐方式。(继承自 UpDownBase) | 
| ThousandsSeparator | 获取或设置一个值,该值指示在适当的时候数字显示框(也称作 up-down 控件)中是否显示千位分隔符。 | 
| Top | 获取或设置控件上边缘与其容器的工作区上边缘之间的距离(以像素为单位)。(继承自 Control) | 
| TopLevelControl | 获取没有另一个 Windows 窗体控件作为其父级的父控件。 通常,这是控件所在的最外面的 Form。(继承自 Control) | 
| UpDownAlign | 获取或设置数字显示框(也称为 up-down 控件)中向上和向下按钮的对齐方式。(继承自 UpDownBase) | 
| UserEdit | 获取或设置一个值,该值指示用户是否已输入值。(继承自 UpDownBase) | 
| UseWaitCursor | 获取或设置一个值,该值指示是否将等待光标用于当前控件以及所有子控件。(继承自 Control) | 
| Value | 获取或设置赋给数字显示框(也称作 up-down 控件)的值。 | 
| VerticalScroll | 获取与垂直滚动条相关联的特性。(继承自 ScrollableControl) | 
| Visible | 获取或设置一个值,该值指示是否显示该控件及其所有子控件。(继承自 Control) | 
| VScroll | 获取或设置一个值,该值指示垂直滚动条是否可见。(继承自 ScrollableControl) | 
| Width | 获取或设置控件的宽度。(继承自 Control) | 
| WindowTarget | 此属性与此类无关。(继承自 Control) | 
方法
事件
显式接口实现
| IContainerControl.ActivateControl(Control) | 激活指定的控件。(继承自 ContainerControl) | 
| IDropTarget.OnDragDrop(DragEventArgs) | 引发 DragDrop 事件。(继承自 Control) | 
| IDropTarget.OnDragEnter(DragEventArgs) | 引发 DragEnter 事件。(继承自 Control) | 
| IDropTarget.OnDragLeave(EventArgs) | 引发 DragLeave 事件。(继承自 Control) | 
| IDropTarget.OnDragOver(DragEventArgs) | 引发 DragOver 事件。(继承自 Control) |