ToolBar 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
ToolBar is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use ToolStrip instead.
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
- 继承
- 属性
示例
下面的代码示例创建一个和三ToolBarButton个ToolBar控件。 工具栏按钮分配给按钮集合,集合分配给工具栏,工具栏将添加到窗体中。 在 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属性,并将图像索引值分配给每个ImageIndex的ToolBarButton属性,从而将图像分配给按钮。 然后,可以通过设置 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 |
已过时.
获取或设置一个值,该值指示如果工具栏变得太小,无法在同一行上显示所有按钮,工具栏按钮是否换行到下一行。 |
方法
活动
| 名称 | 说明 |
|---|---|
| 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) |