通过


ToolBar 类

定义

注意

ToolBar is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use ToolStrip instead.

表示 Windows 工具栏。

此类在 .NET Core 3.1 及更高版本中不可用。 请 ToolStrip 改用它替换和扩展 ToolBar 控件。

public ref class ToolBar : System::Windows::Forms::Control
public class ToolBar : System.Windows.Forms.Control
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class ToolBar : System.Windows.Forms.Control
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.ComponentModel.Browsable(false)]
[System.Obsolete("`ToolBar` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `ToolStrip` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")]
public class ToolBar : System.Windows.Forms.Control
type ToolBar = class
    inherit Control
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ToolBar = class
    inherit Control
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("`ToolBar` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `ToolStrip` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")>]
type ToolBar = class
    inherit Control
Public Class ToolBar
Inherits Control
继承
属性

示例

下面的代码示例创建一个和三ToolBarButtonToolBar控件。 工具栏按钮分配给按钮集合,集合分配给工具栏,工具栏将添加到窗体中。 在 ButtonClick 工具栏的事件中, Button 将计算该 ToolBarButtonClickEventArgs 属性,并打开相应的对话框。 此代码要求已创建 a Form、a OpenFileDialog、a SaveFileDialog和 a PrintDialog

public:
   void InitializeMyToolBar()
   {
      // Create and initialize the ToolBar and ToolBarButton controls.
      toolBar1 = gcnew ToolBar;
      ToolBarButton^ toolBarButton1 = gcnew ToolBarButton;
      ToolBarButton^ toolBarButton2 = gcnew ToolBarButton;
      ToolBarButton^ toolBarButton3 = gcnew ToolBarButton;
      
      // Set the Text properties of the ToolBarButton controls.
      toolBarButton1->Text = "Open";
      toolBarButton2->Text = "Save";
      toolBarButton3->Text = "Print";
      
      // Add the ToolBarButton controls to the ToolBar.
      toolBar1->Buttons->Add( toolBarButton1 );
      toolBar1->Buttons->Add( toolBarButton2 );
      toolBar1->Buttons->Add( toolBarButton3 );
      
      // Add the event-handler delegate.
      toolBar1->ButtonClick += gcnew ToolBarButtonClickEventHandler(
         this, &Form1::toolBar1_ButtonClick );
      
      // Add the ToolBar to the Form.
      Controls->Add( toolBar1 );
   }

private:
   void toolBar1_ButtonClick(
      Object^ sender,
      ToolBarButtonClickEventArgs^ e )
   {
      // Evaluate the Button property to determine which button was clicked.
      switch ( toolBar1->Buttons->IndexOf( e->Button ) )
      {
         case 0:
            openFileDialog1->ShowDialog();
            // Insert code to open the file.
            break;
         case 1:
            saveFileDialog1->ShowDialog();
            // Insert code to save the file.
            break;
         case 2:
            printDialog1->ShowDialog();
            // Insert code to print the file.    
            break;
      }
   }
public void InitializeMyToolBar()
 {
    // Create and initialize the ToolBar and ToolBarButton controls.
    toolBar1 = new ToolBar();
    ToolBarButton toolBarButton1 = new ToolBarButton();
    ToolBarButton toolBarButton2 = new ToolBarButton();
    ToolBarButton toolBarButton3 = new ToolBarButton();
 
    // Set the Text properties of the ToolBarButton controls.
    toolBarButton1.Text = "Open";
    toolBarButton2.Text = "Save";
    toolBarButton3.Text = "Print";
 
    // Add the ToolBarButton controls to the ToolBar.
    toolBar1.Buttons.Add(toolBarButton1);
    toolBar1.Buttons.Add(toolBarButton2);
    toolBar1.Buttons.Add(toolBarButton3);
    
    // Add the event-handler delegate.
    toolBar1.ButtonClick += new ToolBarButtonClickEventHandler (
       this.toolBar1_ButtonClick);
    
    // Add the ToolBar to the Form.
    Controls.Add(toolBar1);
 }
 
 private void toolBar1_ButtonClick (
                         Object sender, 
                         ToolBarButtonClickEventArgs e)
 {
   // Evaluate the Button property to determine which button was clicked.
   switch(toolBar1.Buttons.IndexOf(e.Button))
   {
      case 0:
         openFileDialog1.ShowDialog();
         // Insert code to open the file.
         break; 
      case 1:
         saveFileDialog1.ShowDialog();
         // Insert code to save the file.
         break; 
      case 2:
         printDialog1.ShowDialog();
         // Insert code to print the file.    
         break; 
    }
 }
Public Sub InitializeMyToolBar()
    ' Create and initialize the ToolBar and ToolBarButton controls.
    Dim toolBar1 As New ToolBar()
    Dim toolBarButton1 As New ToolBarButton()
    Dim toolBarButton2 As New ToolBarButton()
    Dim toolBarButton3 As New ToolBarButton()
    
    ' Set the Text properties of the ToolBarButton controls.
    toolBarButton1.Text = "Open"
    toolBarButton2.Text = "Save"
    toolBarButton3.Text = "Print"
    
    ' Add the ToolBarButton controls to the ToolBar.
    toolBar1.Buttons.Add(toolBarButton1)
    toolBar1.Buttons.Add(toolBarButton2)
    toolBar1.Buttons.Add(toolBarButton3)
    
    ' Add the event-handler delegate.
    AddHandler toolBar1.ButtonClick, AddressOf Me.toolBar1_ButtonClick
    
    ' Add the ToolBar to the Form.
    Controls.Add(toolBar1)
End Sub    

Private Sub toolBar1_ButtonClick(ByVal sender As Object, _
ByVal e As ToolBarButtonClickEventArgs)

    ' Evaluate the Button property to determine which button was clicked.
    Select Case toolBar1.Buttons.IndexOf(e.Button)
        Case 0
            openFileDialog1.ShowDialog()
            ' Insert code to open the file.
        Case 1
            saveFileDialog1.ShowDialog()
            ' Insert code to save the file.
        Case 2
            printDialog1.ShowDialog()
            ' Insert code to print the file.
    End Select
End Sub

注解

此类在 .NET Core 3.1 及更高版本中不可用。 请改用 ToolStrip

ToolBar 控件用于显示 ToolBarButton 可显示为标准按钮、切换样式按钮或下拉样式按钮的控件。 可以通过创建ImageList,将其分配给工具栏的ImageList属性,并将图像索引值分配给每个ImageIndexToolBarButton属性,从而将图像分配给按钮。 然后,可以通过设置 Text 图像的属性 ToolBarButton来分配要显示在图像下方或右侧的文本。

Appearance 工具栏的属性设置为 Flat 为工具栏及其按钮提供平面外观。 当鼠标指针在按钮上移动时,其外观将更改为三维。 工具栏按钮可以使用分隔符划分为逻辑组。 分隔符是一个工具栏按钮, Style 其属性设置为 ToolBarButtonStyle.Separator。 当工具栏具有平面外观时,按钮分隔符显示为线条,而不是按钮之间的空格。 Appearance如果该属性设置为Normal,工具栏按钮将显示为高、三维。

如果为 ButtonSize 属性指定值,工具栏中的所有按钮将限制为指定大小。 否则,按钮会根据内容调整其大小,属性 ButtonSize 返回最大按钮的初始大小。

若要创建要显示在该控件上的ToolBarButton控件集合,请使用Add属性的或Insert方法Buttons单独添加ToolBar按钮。

构造函数

名称 说明
ToolBar()
已过时.

初始化 ToolBar 类的新实例。

属性

名称 说明
AccessibilityObject
已过时.

AccessibleObject获取分配给控件的控件。

(继承自 Control)
AccessibleDefaultActionDescription
已过时.

获取或设置控件的默认操作说明,以供辅助功能客户端应用程序使用。

(继承自 Control)
AccessibleDescription
已过时.

获取或设置辅助功能客户端应用程序使用的控件的说明。

(继承自 Control)
AccessibleName
已过时.

获取或设置辅助功能客户端应用程序使用的控件的名称。

(继承自 Control)
AccessibleRole
已过时.

获取或设置控件的可访问角色。

(继承自 Control)
AllowDrop
已过时.

获取或设置一个值,该值指示控件是否可以接受用户拖动到其中的数据。

(继承自 Control)
Anchor
已过时.

获取或设置控件绑定到的容器的边缘,并确定控件的父级如何调整其大小。

(继承自 Control)
Appearance
已过时.

获取或设置确定工具栏控件及其按钮外观的值。

AutoScrollOffset
已过时.

获取或设置此控件滚动到的位置 ScrollControlIntoView(Control)

(继承自 Control)
AutoSize
已过时.

获取或设置一个值,该值指示工具栏是否根据按钮和停靠样式的大小自动调整其大小。

BackColor
已过时.

获取或设置背景色。

BackgroundImage
已过时.

获取或设置背景图像。

BackgroundImageLayout
已过时.

获取或设置背景图像的布局。

BindingContext
已过时.

获取或设置 BindingContext 控件。

(继承自 Control)
BorderStyle
已过时.

获取或设置工具栏控件的边框样式。

Bottom
已过时.

获取控件的下边缘与其容器工作区的上边缘之间的距离(以像素为单位)。

(继承自 Control)
Bounds
已过时.

获取或设置控件的大小和位置,包括其相对于父控件的非client 元素(以像素为单位)。

(继承自 Control)
Buttons
已过时.

获取分配给工具栏控件的控件的 ToolBarButton 集合。

ButtonSize
已过时.

获取或设置工具栏控件上按钮的大小。

CanEnableIme
已过时.

获取一个值,该值指示属性是否可以 ImeMode 设置为活动值,以启用 IME 支持。

(继承自 Control)
CanFocus
已过时.

获取一个值,该值指示控件是否可以接收焦点。

(继承自 Control)
CanRaiseEvents
已过时.

确定是否可以在控件上引发事件。

(继承自 Control)
CanSelect
已过时.

获取一个值,该值指示是否可以选择控件。

(继承自 Control)
Capture
已过时.

获取或设置一个值,该值指示控件是否已捕获鼠标。

(继承自 Control)
CausesValidation
已过时.

获取或设置一个值,该值指示控件是否导致验证在收到焦点时需要验证的任何控件上执行。

(继承自 Control)
ClientRectangle
已过时.

获取表示控件工作区的矩形。

(继承自 Control)
ClientSize
已过时.

获取或设置控件工作区的高度和宽度。

(继承自 Control)
CompanyName
已过时.

获取包含控件的应用程序的公司或创建者的名称。

(继承自 Control)
Container
已过时.

IContainer获取包含 .Component

(继承自 Component)
ContainsFocus
已过时.

获取一个值,该值指示控件或其子控件之一当前是否具有输入焦点。

(继承自 Control)
ContextMenu
已过时.

获取或设置与控件关联的快捷菜单。

(继承自 Control)
ContextMenuStrip
已过时.

获取或设置 ContextMenuStrip 与此控件关联的值。

(继承自 Control)
Controls
已过时.

获取控件中包含的控件的集合。

(继承自 Control)
Created
已过时.

获取一个值,该值指示是否已创建控件。

(继承自 Control)
CreateParams
已过时.

获取创建控件句柄时所需的创建参数。

CreateParams
已过时.

获取创建控件句柄时所需的创建参数。

(继承自 Control)
Cursor
已过时.

获取或设置鼠标指针位于控件上时显示的光标。

(继承自 Control)
DataBindings
已过时.

获取控件的数据绑定。

(继承自 Control)
DataContext
已过时.

获取或设置用于数据绑定的数据上下文。 这是一个环境属性。

(继承自 Control)
DefaultCursor
已过时.

获取或设置控件的默认游标。

(继承自 Control)
DefaultImeMode
已过时.

获取此控件支持的默认输入法编辑器 (IME) 模式。

DefaultImeMode
已过时.

获取控件支持的默认输入法编辑器 (IME) 模式。

(继承自 Control)
DefaultMargin
已过时.

获取默认情况下在控件之间指定的空间(以像素为单位)。

(继承自 Control)
DefaultMaximumSize
已过时.

获取指定为控件的默认最大大小的长度和高度(以像素为单位)。

(继承自 Control)
DefaultMinimumSize
已过时.

获取指定为控件的默认最小大小的长度和高度(以像素为单位)。

(继承自 Control)
DefaultPadding
已过时.

获取控件内容的默认内部间距(以像素为单位)。

(继承自 Control)
DefaultSize
已过时.

获取控件的默认大小。

DefaultSize
已过时.

获取控件的默认大小。

(继承自 Control)
DesignMode
已过时.

获取一个值,该值指示当前是否 Component 处于设计模式。

(继承自 Component)
DeviceDpi
已过时.

获取当前显示控件的显示设备的 DPI 值。

(继承自 Control)
DisplayRectangle
已过时.

获取表示控件的显示区域的矩形。

(继承自 Control)
Disposing
已过时.

获取一个值,该值指示基 Control 类是否正在处理。

(继承自 Control)
Divider
已过时.

获取或设置一个值,该值指示工具栏是否显示分隔符。

Dock
已过时.

获取或设置哪些控件边框停靠到其父控件,并确定控件如何调整其父级的大小。

DoubleBuffered
已过时.

此成员对此控件没有意义。

DropDownArrows
已过时.

获取或设置一个值,该值指示工具栏上的下拉按钮是否显示向下箭头。

Enabled
已过时.

获取或设置一个值,该值指示控件是否可以响应用户交互。

(继承自 Control)
Events
已过时.

获取附加到此 Component对象的事件处理程序的列表。

(继承自 Component)
Focused
已过时.

获取一个值,该值指示控件是否具有输入焦点。

(继承自 Control)
Font
已过时.

获取或设置控件显示的文本的字体。

(继承自 Control)
FontHeight
已过时.

获取或设置控件字体的高度。

(继承自 Control)
ForeColor
已过时.

获取或设置 forecolor 。

Handle
已过时.

获取控件绑定到的窗口句柄。

(继承自 Control)
HasChildren
已过时.

获取一个值,该值指示控件是否包含一个或多个子控件。

(继承自 Control)
Height
已过时.

获取或设置控件的高度。

(继承自 Control)
ImageList
已过时.

获取或设置工具栏按钮控件可用的图像集合。

ImageSize
已过时.

获取分配给工具栏的图像列表中图像的大小。

ImeMode
已过时.

此成员对此控件没有意义。

ImeModeBase
已过时.

获取或设置控件的 IME 模式。

(继承自 Control)
InvokeRequired
已过时.

获取一个值,该值指示调用方在对控件进行方法调用时是否必须调用调用方法,因为调用方与创建控件的线程不同。

(继承自 Control)
IsAccessible
已过时.

获取或设置一个值,该值指示控件是否对辅助功能应用程序可见。

(继承自 Control)
IsAncestorSiteInDesignMode
已过时.

指示此控件的上级位置之一是否位于 DesignMode 中。 此属性为只读。

(继承自 Control)
IsDisposed
已过时.

获取一个值,该值指示控件是否已释放。

(继承自 Control)
IsHandleCreated
已过时.

获取一个值,该值指示控件是否具有与之关联的句柄。

(继承自 Control)
IsMirrored
已过时.

获取一个值,该值指示控件是否镜像。

(继承自 Control)
LayoutEngine
已过时.

获取控件布局引擎的缓存实例。

(继承自 Control)
Left
已过时.

获取或设置控件左边缘与其容器工作区的左边缘之间的距离(以像素为单位)。

(继承自 Control)
Location
已过时.

获取或设置控件左上角相对于其容器左上角的坐标。

(继承自 Control)
Margin
已过时.

获取或设置控件之间的间距。

(继承自 Control)
MaximumSize
已过时.

获取或设置可指定上限 GetPreferredSize(Size) 的大小。

(继承自 Control)
MinimumSize
已过时.

获取或设置可以指定的下限 GetPreferredSize(Size) 的大小。

(继承自 Control)
Name
已过时.

获取或设置控件的名称。

(继承自 Control)
Padding
已过时.

获取或设置控件中的填充。

(继承自 Control)
Parent
已过时.

获取或设置控件的父容器。

(继承自 Control)
PreferredSize
已过时.

获取控件可以容纳到的矩形区域的大小。

(继承自 Control)
ProductName
已过时.

获取包含控件的程序集的产品名称。

(继承自 Control)
ProductVersion
已过时.

获取包含控件的程序集的版本。

(继承自 Control)
RecreatingHandle
已过时.

获取一个值,该值指示控件当前是否正在重新创建其句柄。

(继承自 Control)
Region
已过时.

获取或设置与控件关联的窗口区域。

(继承自 Control)
RenderRightToLeft
已过时.
已过时.

此属性现已过时。

(继承自 Control)
ResizeRedraw
已过时.

获取或设置一个值,该值指示控件在调整大小时是否重新绘制自身。

(继承自 Control)
Right
已过时.

获取控件右边缘与其容器工作区的左边缘之间的距离(以像素为单位)。

(继承自 Control)
RightToLeft
已过时.

此成员对此控件没有意义。

ScaleChildren
已过时.

获取一个值,该值确定子控件的缩放。

(继承自 Control)
ShowFocusCues
已过时.

获取一个值,该值指示控件是否应显示焦点矩形。

(继承自 Control)
ShowKeyboardCues
已过时.

获取一个值,该值指示用户界面是否处于适当的状态以显示或隐藏键盘加速器。

(继承自 Control)
ShowToolTips
已过时.

获取或设置一个值,该值指示工具栏是否显示每个按钮的工具提示。

Site
已过时.

获取或设置控件的站点。

(继承自 Control)
Size
已过时.

获取或设置控件的高度和宽度。

(继承自 Control)
TabIndex
已过时.

获取或设置控件在其容器中的 Tab 键顺序。

(继承自 Control)
TabStop
已过时.

此属性对于此控件没有意义。

Tag
已过时.

获取或设置包含有关控件的数据的对象。

(继承自 Control)
Text
已过时.

获取或设置工具栏的文本。

TextAlign
已过时.

获取或设置文本相对于工具栏按钮控件上显示的每个图像的对齐方式。

Top
已过时.

获取或设置控件上边缘与其容器工作区上边缘之间的距离(以像素为单位)。

(继承自 Control)
TopLevelControl
已过时.

获取其他 Windows 窗体控件未父控件的父控件。 通常,这是控件包含在的最外层 Form

(继承自 Control)
UseWaitCursor
已过时.

获取或设置一个值,该值指示是否对当前控件和所有子控件使用等待游标。

(继承自 Control)
Visible
已过时.

获取或设置一个值,该值指示是否显示控件及其所有子控件。

(继承自 Control)
Width
已过时.

获取或设置控件的宽度。

(继承自 Control)
WindowTarget
已过时.

此属性与此类无关。

(继承自 Control)
Wrappable
已过时.

获取或设置一个值,该值指示如果工具栏变得太小,无法在同一行上显示所有按钮,工具栏按钮是否换行到下一行。

方法

名称 说明
AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)
已过时.

通知为指定的子控件指定的 AccessibleEvents 辅助功能客户端应用程序。

(继承自 Control)
AccessibilityNotifyClients(AccessibleEvents, Int32)
已过时.

通知为指定的子控件指定的 AccessibleEvents 辅助功能客户端应用程序。

(继承自 Control)
BeginInvoke(Action)
已过时.

在创建控件的基础句柄的线程上异步执行指定的委托。

(继承自 Control)
BeginInvoke(Delegate, Object[])
已过时.

在创建控件的基础句柄的线程上,使用指定的参数异步执行指定的委托。

(继承自 Control)
BeginInvoke(Delegate)
已过时.

在创建控件的基础句柄的线程上异步执行指定的委托。

(继承自 Control)
BringToFront()
已过时.

将控件置于 z 顺序的前面。

(继承自 Control)
Contains(Control)
已过时.

检索一个值,该值指示指定的控件是否为控件的子级。

(继承自 Control)
CreateAccessibilityInstance()
已过时.

为控件创建新的辅助功能对象。

(继承自 Control)
CreateControl()
已过时.

强制创建可见控件,包括创建句柄和任何可见子控件。

(继承自 Control)
CreateControlsInstance()
已过时.

为控件创建控件集合的新实例。

(继承自 Control)
CreateGraphics()
已过时.

Graphics创建控件。

(继承自 Control)
CreateHandle()
已过时.

为控件创建句柄。

CreateHandle()
已过时.

为控件创建句柄。

(继承自 Control)
CreateObjRef(Type)
已过时.

创建一个对象,其中包含生成用于与远程对象通信的代理所需的所有相关信息。

(继承自 MarshalByRefObject)
DefWndProc(Message)
已过时.

将指定的消息发送到默认窗口过程。

(继承自 Control)
DestroyHandle()
已过时.

销毁与控件关联的句柄。

(继承自 Control)
Dispose()
已过时.

释放该 Component命令使用的所有资源。

(继承自 Component)
Dispose(Boolean)
已过时.

释放由托管资源使用 ToolBar 的非托管资源,并选择性地释放托管资源。

Dispose(Boolean)
已过时.

释放由及其子控件使用 Control 的非托管资源,并选择性地释放托管资源。

(继承自 Control)
DoDragDrop(Object, DragDropEffects, Bitmap, Point, Boolean)
已过时.

开始拖动操作。

(继承自 Control)
DoDragDrop(Object, DragDropEffects)
已过时.

开始拖放操作。

(继承自 Control)
DoDragDropAsJson<T>(T, DragDropEffects, Bitmap, Point, Boolean)
已过时.

表示 Windows 工具栏。

此类在 .NET Core 3.1 及更高版本中不可用。 请 ToolStrip 改用它替换和扩展 ToolBar 控件。

(继承自 Control)
DoDragDropAsJson<T>(T, DragDropEffects)
已过时.

表示 Windows 工具栏。

此类在 .NET Core 3.1 及更高版本中不可用。 请 ToolStrip 改用它替换和扩展 ToolBar 控件。

(继承自 Control)
DrawToBitmap(Bitmap, Rectangle)
已过时.

支持呈现到指定的位图。

(继承自 Control)
EndInvoke(IAsyncResult)
已过时.

检索传递的异步操作 IAsyncResult 的返回值。

(继承自 Control)
Equals(Object)
已过时.

确定指定的对象是否等于当前对象。

(继承自 Object)
FindForm()
已过时.

检索控件打开的窗体。

(继承自 Control)
Focus()
已过时.

将输入焦点设置为控件。

(继承自 Control)
GetAccessibilityObjectById(Int32)
已过时.

检索指定的 AccessibleObject

(继承自 Control)
GetAutoSizeMode()
已过时.

检索一个值,该值指示控件在启用控件 AutoSize 属性时的行为方式。

(继承自 Control)
GetChildAtPoint(Point, GetChildAtPointSkip)
已过时.

检索位于指定坐标处的子控件,指定是否忽略特定类型的子控件。

(继承自 Control)
GetChildAtPoint(Point)
已过时.

检索位于指定坐标处的子控件。

(继承自 Control)
GetContainerControl()
已过时.

返回控件的父控件链的下一个 ContainerControl

(继承自 Control)
GetHashCode()
已过时.

用作默认哈希函数。

(继承自 Object)
GetLifetimeService()
已过时.

检索控制此实例的生存期策略的当前生存期服务对象。

(继承自 MarshalByRefObject)
GetNextControl(Control, Boolean)
已过时.

按子控件的 Tab 键顺序检索下一个控件向前或后退。

(继承自 Control)
GetPreferredSize(Size)
已过时.

检索可安装控件的矩形区域的大小。

(继承自 Control)
GetScaledBounds(Rectangle, SizeF, BoundsSpecified)
已过时.

检索在其中缩放控件的边界。

(继承自 Control)
GetService(Type)
已过时.

返回一个对象,该对象表示服务由 Component 或其 Container提供的服务。

(继承自 Component)
GetStyle(ControlStyles)
已过时.

检索控件的指定控件样式位的值。

(继承自 Control)
GetTopLevel()
已过时.

确定控件是否为顶级控件。

(继承自 Control)
GetType()
已过时.

获取当前实例的 Type

(继承自 Object)
Hide()
已过时.

隐藏用户的控件。

(继承自 Control)
InitializeLifetimeService()
已过时.

获取生存期服务对象来控制此实例的生存期策略。

(继承自 MarshalByRefObject)
InitLayout()
已过时.

在控件添加到另一个容器后调用。

(继承自 Control)
Invalidate()
已过时.

使控件的整个图面失效,并使控件重新绘制。

(继承自 Control)
Invalidate(Boolean)
已过时.

使控件的特定区域失效,并导致绘制消息发送到控件。 (可选)使分配给控件的子控件失效。

(继承自 Control)
Invalidate(Rectangle, Boolean)
已过时.

使控件的指定区域失效(将其添加到控件的更新区域,即将在下一次绘制操作时重新绘制的区域),并导致绘制消息发送到控件。 (可选)使分配给控件的子控件失效。

(继承自 Control)
Invalidate(Rectangle)
已过时.

使控件的指定区域失效(将其添加到控件的更新区域,即将在下一次绘制操作时重新绘制的区域),并导致绘制消息发送到控件。

(继承自 Control)
Invalidate(Region, Boolean)
已过时.

使控件的指定区域失效(将其添加到控件的更新区域,即将在下一次绘制操作时重新绘制的区域),并导致绘制消息发送到控件。 (可选)使分配给控件的子控件失效。

(继承自 Control)
Invalidate(Region)
已过时.

使控件的指定区域失效(将其添加到控件的更新区域,即将在下一次绘制操作时重新绘制的区域),并导致绘制消息发送到控件。

(继承自 Control)
Invoke(Action)
已过时.

在拥有控件的基础窗口句柄的线程上执行指定的委托。

(继承自 Control)
Invoke(Delegate, Object[])
已过时.

在拥有控件的基础窗口句柄的线程上,使用指定的参数列表执行指定的委托。

(继承自 Control)
Invoke(Delegate)
已过时.

在拥有控件的基础窗口句柄的线程上执行指定的委托。

(继承自 Control)
Invoke<T>(Func<T>)
已过时.

在拥有控件的基础窗口句柄的线程上执行指定的委托。

(继承自 Control)
InvokeAsync(Action, CancellationToken)
已过时.

在拥有控件句柄的线程上异步调用指定的同步回调。

(继承自 Control)
InvokeAsync(Func<CancellationToken,ValueTask>, CancellationToken)
已过时.

在拥有控件句柄的线程上执行指定的异步回调。

(继承自 Control)
InvokeAsync<T>(Func<CancellationToken,ValueTask<T>>, CancellationToken)
已过时.

在拥有控件句柄的线程上执行指定的异步回调。

(继承自 Control)
InvokeAsync<T>(Func<T>, CancellationToken)
已过时.

在拥有控件句柄的线程上异步调用指定的同步回调。

(继承自 Control)
InvokeGotFocus(Control, EventArgs)
已过时.

GotFocus引发指定控件的事件。

(继承自 Control)
InvokeLostFocus(Control, EventArgs)
已过时.

LostFocus引发指定控件的事件。

(继承自 Control)
InvokeOnClick(Control, EventArgs)
已过时.

Click引发指定控件的事件。

(继承自 Control)
InvokePaint(Control, PaintEventArgs)
已过时.

Paint引发指定控件的事件。

(继承自 Control)
InvokePaintBackground(Control, PaintEventArgs)
已过时.

PaintBackground引发指定控件的事件。

(继承自 Control)
IsInputChar(Char)
已过时.

确定字符是否是控件识别的输入字符。

(继承自 Control)
IsInputKey(Keys)
已过时.

确定指定的键是常规输入键还是需要预处理的特殊键。

(继承自 Control)
LogicalToDeviceUnits(Int32)
已过时.

将逻辑 DPI 值转换为其等效的 DeviceUnit DPI 值。

(继承自 Control)
LogicalToDeviceUnits(Size)
已过时.

通过缩放当前 DPI 的大小并将其舍入为最接近的整数值(宽度和高度)从逻辑单位转换为设备单位。

(继承自 Control)
MemberwiseClone()
已过时.

创建当前 Object的浅表副本。

(继承自 Object)
MemberwiseClone(Boolean)
已过时.

创建当前 MarshalByRefObject 对象的浅表副本。

(继承自 MarshalByRefObject)
NotifyInvalidate(Rectangle)
已过时.

Invalidated使用控件的指定区域引发事件,使该事件失效。

(继承自 Control)
OnAutoSizeChanged(EventArgs)
已过时.

引发 AutoSizeChanged 事件。

(继承自 Control)
OnBackColorChanged(EventArgs)
已过时.

引发 BackColorChanged 事件。

(继承自 Control)
OnBackgroundImageChanged(EventArgs)
已过时.

引发 BackgroundImageChanged 事件。

(继承自 Control)
OnBackgroundImageLayoutChanged(EventArgs)
已过时.

引发 BackgroundImageLayoutChanged 事件。

(继承自 Control)
OnBindingContextChanged(EventArgs)
已过时.

引发 BindingContextChanged 事件。

(继承自 Control)
OnButtonClick(ToolBarButtonClickEventArgs)
已过时.

引发 ButtonClick 事件。

OnButtonDropDown(ToolBarButtonClickEventArgs)
已过时.

引发 ButtonDropDown 事件。

OnCausesValidationChanged(EventArgs)
已过时.

引发 CausesValidationChanged 事件。

(继承自 Control)
OnChangeUICues(UICuesEventArgs)
已过时.

引发 ChangeUICues 事件。

(继承自 Control)
OnClick(EventArgs)
已过时.

引发 Click 事件。

(继承自 Control)
OnClientSizeChanged(EventArgs)
已过时.

引发 ClientSizeChanged 事件。

(继承自 Control)
OnContextMenuChanged(EventArgs)
已过时.

引发 ContextMenuChanged 事件。

(继承自 Control)
OnContextMenuStripChanged(EventArgs)
已过时.

引发 ContextMenuStripChanged 事件。

(继承自 Control)
OnControlAdded(ControlEventArgs)
已过时.

引发 ControlAdded 事件。

(继承自 Control)
OnControlRemoved(ControlEventArgs)
已过时.

引发 ControlRemoved 事件。

(继承自 Control)
OnCreateControl()
已过时.

CreateControl()引发方法。

(继承自 Control)
OnCursorChanged(EventArgs)
已过时.

引发 CursorChanged 事件。

(继承自 Control)
OnDataContextChanged(EventArgs)
已过时.

表示 Windows 工具栏。

此类在 .NET Core 3.1 及更高版本中不可用。 请 ToolStrip 改用它替换和扩展 ToolBar 控件。

(继承自 Control)
OnDockChanged(EventArgs)
已过时.

引发 DockChanged 事件。

(继承自 Control)
OnDoubleClick(EventArgs)
已过时.

引发 DoubleClick 事件。

(继承自 Control)
OnDpiChangedAfterParent(EventArgs)
已过时.

引发 DpiChangedAfterParent 事件。

(继承自 Control)
OnDpiChangedBeforeParent(EventArgs)
已过时.

引发 DpiChangedBeforeParent 事件。

(继承自 Control)
OnDragDrop(DragEventArgs)
已过时.

引发 DragDrop 事件。

(继承自 Control)
OnDragEnter(DragEventArgs)
已过时.

引发 DragEnter 事件。

(继承自 Control)
OnDragLeave(EventArgs)
已过时.

引发 DragLeave 事件。

(继承自 Control)
OnDragOver(DragEventArgs)
已过时.

引发 DragOver 事件。

(继承自 Control)
OnEnabledChanged(EventArgs)
已过时.

引发 EnabledChanged 事件。

(继承自 Control)
OnEnter(EventArgs)
已过时.

引发 Enter 事件。

(继承自 Control)
OnFontChanged(EventArgs)
已过时.

引发 FontChanged 事件。

OnFontChanged(EventArgs)
已过时.

引发 FontChanged 事件。

(继承自 Control)
OnForeColorChanged(EventArgs)
已过时.

引发 ForeColorChanged 事件。

(继承自 Control)
OnGiveFeedback(GiveFeedbackEventArgs)
已过时.

引发 GiveFeedback 事件。

(继承自 Control)
OnGotFocus(EventArgs)
已过时.

引发 GotFocus 事件。

(继承自 Control)
OnHandleCreated(EventArgs)
已过时.

引发 HandleCreated 事件。

OnHandleCreated(EventArgs)
已过时.

引发 HandleCreated 事件。

(继承自 Control)
OnHandleDestroyed(EventArgs)
已过时.

引发 HandleDestroyed 事件。

(继承自 Control)
OnHelpRequested(HelpEventArgs)
已过时.

引发 HelpRequested 事件。

(继承自 Control)
OnImeModeChanged(EventArgs)
已过时.

引发 ImeModeChanged 事件。

(继承自 Control)
OnInvalidated(InvalidateEventArgs)
已过时.

引发 Invalidated 事件。

(继承自 Control)
OnKeyDown(KeyEventArgs)
已过时.

引发 KeyDown 事件。

(继承自 Control)
OnKeyPress(KeyPressEventArgs)
已过时.

引发 KeyPress 事件。

(继承自 Control)
OnKeyUp(KeyEventArgs)
已过时.

引发 KeyUp 事件。

(继承自 Control)
OnLayout(LayoutEventArgs)
已过时.

引发 Layout 事件。

(继承自 Control)
OnLeave(EventArgs)
已过时.

引发 Leave 事件。

(继承自 Control)
OnLocationChanged(EventArgs)
已过时.

引发 LocationChanged 事件。

(继承自 Control)
OnLostFocus(EventArgs)
已过时.

引发 LostFocus 事件。

(继承自 Control)
OnMarginChanged(EventArgs)
已过时.

引发 MarginChanged 事件。

(继承自 Control)
OnMouseCaptureChanged(EventArgs)
已过时.

引发 MouseCaptureChanged 事件。

(继承自 Control)
OnMouseClick(MouseEventArgs)
已过时.

引发 MouseClick 事件。

(继承自 Control)
OnMouseDoubleClick(MouseEventArgs)
已过时.

引发 MouseDoubleClick 事件。

(继承自 Control)
OnMouseDown(MouseEventArgs)
已过时.

引发 MouseDown 事件。

(继承自 Control)
OnMouseEnter(EventArgs)
已过时.

引发 MouseEnter 事件。

(继承自 Control)
OnMouseHover(EventArgs)
已过时.

引发 MouseHover 事件。

(继承自 Control)
OnMouseLeave(EventArgs)
已过时.

引发 MouseLeave 事件。

(继承自 Control)
OnMouseMove(MouseEventArgs)
已过时.

引发 MouseMove 事件。

(继承自 Control)
OnMouseUp(MouseEventArgs)
已过时.

引发 MouseUp 事件。

(继承自 Control)
OnMouseWheel(MouseEventArgs)
已过时.

引发 MouseWheel 事件。

(继承自 Control)
OnMove(EventArgs)
已过时.

引发 Move 事件。

(继承自 Control)
OnNotifyMessage(Message)
已过时.

通知 Windows 消息的控制。

(继承自 Control)
OnPaddingChanged(EventArgs)
已过时.

引发 PaddingChanged 事件。

(继承自 Control)
OnPaint(PaintEventArgs)
已过时.

引发 Paint 事件。

(继承自 Control)
OnPaintBackground(PaintEventArgs)
已过时.

绘制控件的背景。

(继承自 Control)
OnParentBackColorChanged(EventArgs)
已过时.

BackColorChanged当控件容器的属性值更改时BackColor引发事件。

(继承自 Control)
OnParentBackgroundImageChanged(EventArgs)
已过时.

BackgroundImageChanged当控件容器的属性值更改时BackgroundImage引发事件。

(继承自 Control)
OnParentBindingContextChanged(EventArgs)
已过时.

BindingContextChanged当控件容器的属性值更改时BindingContext引发事件。

(继承自 Control)
OnParentChanged(EventArgs)
已过时.

引发 ParentChanged 事件。

(继承自 Control)
OnParentCursorChanged(EventArgs)
已过时.

引发 CursorChanged 事件。

(继承自 Control)
OnParentDataContextChanged(EventArgs)
已过时.

表示 Windows 工具栏。

此类在 .NET Core 3.1 及更高版本中不可用。 请 ToolStrip 改用它替换和扩展 ToolBar 控件。

(继承自 Control)
OnParentEnabledChanged(EventArgs)
已过时.

EnabledChanged当控件容器的属性值更改时Enabled引发事件。

(继承自 Control)
OnParentFontChanged(EventArgs)
已过时.

FontChanged当控件容器的属性值更改时Font引发事件。

(继承自 Control)
OnParentForeColorChanged(EventArgs)
已过时.

ForeColorChanged当控件容器的属性值更改时ForeColor引发事件。

(继承自 Control)
OnParentRightToLeftChanged(EventArgs)
已过时.

RightToLeftChanged当控件容器的属性值更改时RightToLeft引发事件。

(继承自 Control)
OnParentVisibleChanged(EventArgs)
已过时.

VisibleChanged当控件容器的属性值更改时Visible引发事件。

(继承自 Control)
OnPreviewKeyDown(PreviewKeyDownEventArgs)
已过时.

引发 PreviewKeyDown 事件。

(继承自 Control)
OnPrint(PaintEventArgs)
已过时.

引发 Paint 事件。

(继承自 Control)
OnQueryContinueDrag(QueryContinueDragEventArgs)
已过时.

引发 QueryContinueDrag 事件。

(继承自 Control)
OnRegionChanged(EventArgs)
已过时.

引发 RegionChanged 事件。

(继承自 Control)
OnResize(EventArgs)
已过时.

引发 Resize 事件。

OnResize(EventArgs)
已过时.

引发 Resize 事件。

(继承自 Control)
OnRightToLeftChanged(EventArgs)
已过时.

引发 RightToLeftChanged 事件。

(继承自 Control)
OnSizeChanged(EventArgs)
已过时.

引发 SizeChanged 事件。

(继承自 Control)
OnStyleChanged(EventArgs)
已过时.

引发 StyleChanged 事件。

(继承自 Control)
OnSystemColorsChanged(EventArgs)
已过时.

引发 SystemColorsChanged 事件。

(继承自 Control)
OnTabIndexChanged(EventArgs)
已过时.

引发 TabIndexChanged 事件。

(继承自 Control)
OnTabStopChanged(EventArgs)
已过时.

引发 TabStopChanged 事件。

(继承自 Control)
OnTextChanged(EventArgs)
已过时.

引发 TextChanged 事件。

(继承自 Control)
OnValidated(EventArgs)
已过时.

引发 Validated 事件。

(继承自 Control)
OnValidating(CancelEventArgs)
已过时.

引发 Validating 事件。

(继承自 Control)
OnVisibleChanged(EventArgs)
已过时.

引发 VisibleChanged 事件。

(继承自 Control)
PerformLayout()
已过时.

强制控件将布局逻辑应用于其所有子控件。

(继承自 Control)
PerformLayout(Control, String)
已过时.

强制控件将布局逻辑应用于其所有子控件。

(继承自 Control)
PointToClient(Point)
已过时.

将指定屏幕点的位置计算为客户端坐标。

(继承自 Control)
PointToScreen(Point)
已过时.

将指定客户端点的位置计算为屏幕坐标。

(继承自 Control)
PreProcessControlMessage(Message)
已过时.

在调度键盘或输入消息之前,预处理消息循环中的键盘或输入消息。

(继承自 Control)
PreProcessMessage(Message)
已过时.

在调度键盘或输入消息之前,预处理消息循环中的键盘或输入消息。

(继承自 Control)
ProcessCmdKey(Message, Keys)
已过时.

处理命令键。

(继承自 Control)
ProcessDialogChar(Char)
已过时.

处理对话字符。

(继承自 Control)
ProcessDialogKey(Keys)
已过时.

处理对话键。

(继承自 Control)
ProcessKeyEventArgs(Message)
已过时.

处理键消息并生成相应的控制事件。

(继承自 Control)
ProcessKeyMessage(Message)
已过时.

处理键盘消息。

(继承自 Control)
ProcessKeyPreview(Message)
已过时.

预览键盘消息。

(继承自 Control)
ProcessMnemonic(Char)
已过时.

处理助记字符。

(继承自 Control)
RaiseDragEvent(Object, DragEventArgs)
已过时.

引发适当的拖动事件。

(继承自 Control)
RaiseKeyEvent(Object, KeyEventArgs)
已过时.

引发相应的键事件。

(继承自 Control)
RaiseMouseEvent(Object, MouseEventArgs)
已过时.

引发相应的鼠标事件。

(继承自 Control)
RaisePaintEvent(Object, PaintEventArgs)
已过时.

引发适当的画图事件。

(继承自 Control)
RecreateHandle()
已过时.

强制重新创建控件的句柄。

(继承自 Control)
RectangleToClient(Rectangle)
已过时.

计算客户端坐标中指定屏幕矩形的大小和位置。

(继承自 Control)
RectangleToScreen(Rectangle)
已过时.

计算屏幕坐标中指定客户端矩形的大小和位置。

(继承自 Control)
Refresh()
已过时.

强制控件使其工作区失效,并立即重新绘制自身和任何子控件。

(继承自 Control)
RescaleConstantsForDpi(Int32, Int32)
已过时.

提供常量,用于在发生 DPI 更改时重新缩放控件。

(继承自 Control)
ResetBackColor()
已过时.

BackColor 属性重置为其默认值。

(继承自 Control)
ResetBindings()
已过时.

使绑定到 BindingSource 控件的控件重新读取列表中的所有项并刷新其显示的值。

(继承自 Control)
ResetCursor()
已过时.

Cursor 属性重置为其默认值。

(继承自 Control)
ResetFont()
已过时.

Font 属性重置为其默认值。

(继承自 Control)
ResetForeColor()
已过时.

ForeColor 属性重置为其默认值。

(继承自 Control)
ResetImeMode()
已过时.

ImeMode 属性重置为其默认值。

(继承自 Control)
ResetMouseEventArgs()
已过时.

重置控件以处理 MouseLeave 事件。

(继承自 Control)
ResetRightToLeft()
已过时.

RightToLeft 属性重置为其默认值。

(继承自 Control)
ResetText()
已过时.

Text 属性重置为其默认值(Empty)。

(继承自 Control)
ResumeLayout()
已过时.

恢复通常的布局逻辑。

(继承自 Control)
ResumeLayout(Boolean)
已过时.

恢复通常的布局逻辑,可以选择强制立即布局挂起的布局请求。

(继承自 Control)
RtlTranslateAlignment(ContentAlignment)
已过时.

将指定的 ContentAlignment 值转换为适当的 ContentAlignment 值,以支持从右到左的文本。

(继承自 Control)
RtlTranslateAlignment(HorizontalAlignment)
已过时.

将指定的 HorizontalAlignment 值转换为适当的 HorizontalAlignment 值,以支持从右到左的文本。

(继承自 Control)
RtlTranslateAlignment(LeftRightAlignment)
已过时.

将指定的 LeftRightAlignment 值转换为适当的 LeftRightAlignment 值,以支持从右到左的文本。

(继承自 Control)
RtlTranslateContent(ContentAlignment)
已过时.

将指定的 ContentAlignment 值转换为适当的 ContentAlignment 值,以支持从右到左的文本。

(继承自 Control)
RtlTranslateHorizontal(HorizontalAlignment)
已过时.

将指定的 HorizontalAlignment 值转换为适当的 HorizontalAlignment 值,以支持从右到左的文本。

(继承自 Control)
RtlTranslateLeftRight(LeftRightAlignment)
已过时.

将指定的 LeftRightAlignment 值转换为适当的 LeftRightAlignment 值,以支持从右到左的文本。

(继承自 Control)
Scale(Single, Single)
已过时.
已过时.

缩放整个控件和任何子控件。

(继承自 Control)
Scale(Single)
已过时.
已过时.

缩放控件和任何子控件。

(继承自 Control)
Scale(SizeF)
已过时.

按指定的缩放因子缩放控件和所有子控件。

(继承自 Control)
ScaleBitmapLogicalToDevice(Bitmap)
已过时.

当发生 DPI 更改时,将逻辑位图值缩放为其等效的设备单位值。

(继承自 Control)
ScaleControl(SizeF, BoundsSpecified)
已过时.

缩放控件的位置、大小、填充和边距。

ScaleControl(SizeF, BoundsSpecified)
已过时.

缩放控件的位置、大小、填充和边距。

(继承自 Control)
ScaleCore(Single, Single)
已过时.

此方法与此类无关。

ScaleCore(Single, Single)
已过时.

此方法与此类无关。

(继承自 Control)
Select()
已过时.

激活控件。

(继承自 Control)
Select(Boolean, Boolean)
已过时.

激活子控件。 (可选)指定要从中选择控件的 Tab 键顺序中的方向。

(继承自 Control)
SelectNextControl(Control, Boolean, Boolean, Boolean, Boolean)
已过时.

激活下一个控件。

(继承自 Control)
SendToBack()
已过时.

将控件发送到 z 顺序的后面。

(继承自 Control)
SetAutoSizeMode(AutoSizeMode)
已过时.

设置一个值,该值指示控件在启用控件 AutoSize 属性时的行为方式。

(继承自 Control)
SetBounds(Int32, Int32, Int32, Int32, BoundsSpecified)
已过时.

将控件的指定边界设置为指定的位置和大小。

(继承自 Control)
SetBounds(Int32, Int32, Int32, Int32)
已过时.

将控件的边界设置为指定的位置和大小。

(继承自 Control)
SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
已过时.

设置控件的 ToolBar 指定边界。

SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
已过时.

执行设置此控件的指定边界的工作。

(继承自 Control)
SetClientSizeCore(Int32, Int32)
已过时.

设置控件的工作区的大小。

(继承自 Control)
SetStyle(ControlStyles, Boolean)
已过时.

将指定的 ControlStyles 标志设置为或 truefalse

(继承自 Control)
SetTopLevel(Boolean)
已过时.

将控件设置为顶级控件。

(继承自 Control)
SetVisibleCore(Boolean)
已过时.

将控件设置为指定的可见状态。

(继承自 Control)
Show()
已过时.

向用户显示控件。

(继承自 Control)
SizeFromClientSize(Size)
已过时.

从工作区的高度和宽度确定整个控件的大小。

(继承自 Control)
SuspendLayout()
已过时.

暂时挂起控件的布局逻辑。

(继承自 Control)
ToString()
已过时.

返回一个表示控件的 ToolBar 字符串。

Update()
已过时.

使控件在其工作区内重新绘制无效区域。

(继承自 Control)
UpdateBounds()
已过时.

使用当前大小和位置更新控件的边界。

(继承自 Control)
UpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32)
已过时.

使用指定的大小、位置和客户端大小更新控件的边界。

(继承自 Control)
UpdateBounds(Int32, Int32, Int32, Int32)
已过时.

使用指定的大小和位置更新控件的边界。

(继承自 Control)
UpdateStyles()
已过时.

强制将分配的样式重新应用于控件。

(继承自 Control)
UpdateZOrder()
已过时.

按父级的 z 顺序更新控件。

(继承自 Control)
WndProc(Message)
已过时.

处理 Windows 消息。

WndProc(Message)
已过时.

处理 Windows 消息。

(继承自 Control)

活动

名称 说明
AutoSizeChanged
已过时.

当属性的值 AutoSize 发生更改时发生。

BackColorChanged
已过时.

属性 BackColor 更改时发生。

BackgroundImageChanged
已过时.

属性 BackgroundImage 更改时发生。

BackgroundImageLayoutChanged
已过时.

属性 BackgroundImageLayout 更改时发生。

BindingContextChanged
已过时.

BindingContext 属性的值更改时发生。

(继承自 Control)
ButtonClick
已过时.

ToolBarButton单击某个时ToolBar发生。

ButtonDropDown
已过时.

单击下拉样式 ToolBarButton 或其向下箭头时发生。

CausesValidationChanged
已过时.

CausesValidation 属性的值更改时发生。

(继承自 Control)
ChangeUICues
已过时.

焦点或键盘用户界面(UI)提示更改时发生。

(继承自 Control)
Click
已过时.

单击控件时发生。

(继承自 Control)
ClientSizeChanged
已过时.

ClientSize 属性的值更改时发生。

(继承自 Control)
ContextMenuChanged
已过时.

ContextMenu 属性的值更改时发生。

(继承自 Control)
ContextMenuStripChanged
已过时.

ContextMenuStrip 属性的值更改时发生。

(继承自 Control)
ControlAdded
已过时.

将新控件添加到该控件 Control.ControlCollection时发生。

(继承自 Control)
ControlRemoved
已过时.

从中删除 Control.ControlCollection控件时发生 。

(继承自 Control)
CursorChanged
已过时.

Cursor 属性的值更改时发生。

(继承自 Control)
DataContextChanged
已过时.

DataContext 属性的值更改时发生。

(继承自 Control)
Disposed
已过时.

当组件通过对方法的调用 Dispose() 释放时发生。

(继承自 Component)
DockChanged
已过时.

Dock 属性的值更改时发生。

(继承自 Control)
DoubleClick
已过时.

双击控件时发生。

(继承自 Control)
DpiChangedAfterParent
已过时.

在控件的父控件或窗体的 DPI 更改后,以编程方式更改控件的 DPI 设置时发生。

(继承自 Control)
DpiChangedBeforeParent
已过时.

在控件的父控件或窗体发生 DPI 更改事件之前,以编程方式更改控件的 DPI 设置时发生。

(继承自 Control)
DragDrop
已过时.

完成拖放操作时发生。

(继承自 Control)
DragEnter
已过时.

当对象被拖动到控件的边界时发生。

(继承自 Control)
DragLeave
已过时.

当对象被拖出控件的边界时发生。

(继承自 Control)
DragOver
已过时.

当对象拖动到控件边界上时发生。

(继承自 Control)
EnabledChanged
已过时.

Enabled 属性值更改后发生。

(继承自 Control)
Enter
已过时.

输入控件时发生。

(继承自 Control)
FontChanged
已过时.

Font 属性值更改时发生。

(继承自 Control)
ForeColorChanged
已过时.

属性 ForeColor 更改时发生。

GiveFeedback
已过时.

在拖动操作期间发生。

(继承自 Control)
GotFocus
已过时.

当控件收到焦点时发生。

(继承自 Control)
HandleCreated
已过时.

为控件创建句柄时发生。

(继承自 Control)
HandleDestroyed
已过时.

当控件的句柄正在销毁时发生。

(继承自 Control)
HelpRequested
已过时.

当用户请求控件帮助时发生。

(继承自 Control)
ImeModeChanged
已过时.

属性 ImeMode 更改时发生。

Invalidated
已过时.

当控件的显示需要重绘时发生。

(继承自 Control)
KeyDown
已过时.

当控件具有焦点时按下键时发生。

(继承自 Control)
KeyPress
已过时.

当控件具有焦点时按下字符、空格或反空间键时发生。

(继承自 Control)
KeyUp
已过时.

当控件具有焦点时释放键时发生。

(继承自 Control)
Layout
已过时.

当控件应重新定位其子控件时发生。

(继承自 Control)
Leave
已过时.

当输入焦点离开控件时发生。

(继承自 Control)
LocationChanged
已过时.

Location 属性值更改后发生。

(继承自 Control)
LostFocus
已过时.

当控件失去焦点时发生。

(继承自 Control)
MarginChanged
已过时.

当控件的边距更改时发生。

(继承自 Control)
MouseCaptureChanged
已过时.

当控件失去鼠标捕获时发生。

(继承自 Control)
MouseClick
已过时.

当鼠标单击控件时发生。

(继承自 Control)
MouseDoubleClick
已过时.

在鼠标双击控件时发生。

(继承自 Control)
MouseDown
已过时.

当鼠标指针位于控件上并按下鼠标按钮时发生。

(继承自 Control)
MouseEnter
已过时.

当鼠标指针进入控件时发生。

(继承自 Control)
MouseHover
已过时.

当鼠标指针停留在控件上时发生。

(继承自 Control)
MouseLeave
已过时.

当鼠标指针离开控件时发生。

(继承自 Control)
MouseMove
已过时.

当鼠标指针移到控件上时发生。

(继承自 Control)
MouseUp
已过时.

当鼠标指针位于控件上并释放鼠标按钮时发生。

(继承自 Control)
MouseWheel
已过时.

当鼠标滚轮在控件具有焦点时移动时发生。

(继承自 Control)
Move
已过时.

移动控件时发生。

(继承自 Control)
PaddingChanged
已过时.

当控件的填充更改时发生。

(继承自 Control)
Paint
已过时.

此成员对此控件没有意义。

ParentChanged
已过时.

Parent 属性值更改时发生。

(继承自 Control)
PreviewKeyDown
已过时.

KeyDown 焦点位于此控件上时按下键时,在事件发生之前发生。

(继承自 Control)
QueryAccessibilityHelp
已过时.

在为辅助功能应用程序提供帮助时 AccessibleObject 发生。

(继承自 Control)
QueryContinueDrag
已过时.

在拖放操作期间发生,并使拖动源能够确定是否应取消拖放操作。

(继承自 Control)
RegionChanged
已过时.

Region 属性的值更改时发生。

(继承自 Control)
Resize
已过时.

调整控件大小时发生。

(继承自 Control)
RightToLeftChanged
已过时.

属性 RightToLeft 更改时发生。

SizeChanged
已过时.

Size 属性值更改时发生。

(继承自 Control)
StyleChanged
已过时.

当控件样式更改时发生。

(继承自 Control)
SystemColorsChanged
已过时.

当系统颜色更改时发生。

(继承自 Control)
TabIndexChanged
已过时.

TabIndex 属性值更改时发生。

(继承自 Control)
TabStopChanged
已过时.

TabStop 属性值更改时发生。

(继承自 Control)
TextChanged
已过时.

属性 Text 更改时发生。

Validated
已过时.

在控件完成验证时发生。

(继承自 Control)
Validating
已过时.

当控件正在验证时发生。

(继承自 Control)
VisibleChanged
已过时.

Visible 属性值更改时发生。

(继承自 Control)

显式接口实现

名称 说明
IDropTarget.OnDragDrop(DragEventArgs)
已过时.

引发 DragDrop 事件。

(继承自 Control)
IDropTarget.OnDragEnter(DragEventArgs)
已过时.

引发 DragEnter 事件。

(继承自 Control)
IDropTarget.OnDragLeave(EventArgs)
已过时.

引发 DragLeave 事件。

(继承自 Control)
IDropTarget.OnDragOver(DragEventArgs)
已过时.

引发 DragOver 事件。

(继承自 Control)

适用于

另请参阅