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
- 繼承
- 屬性
範例
以下程式碼範例建立 a ToolBar 和三個 ToolBarButton 控制項。 工具列按鈕被分配到按鈕集合,集合分配到工具列,工具列則被加入表單。 當 ButtonClick 工具列發生時, Button 會評估 的 ToolBarButtonClickEventArgs 屬性,並開啟相應的對話框。 此程式碼要求已建立 a Form、an OpenFileDialog、a SaveFileDialog、a 與 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控制項要顯示在 ToolBar上,請使用Add屬性中的 Buttons or Insert 方法分別新增按鈕。
建構函式
| 名稱 | Description |
|---|---|
| ToolBar() |
已淘汰.
初始化 ToolBar 類別的新執行個體。 |
屬性
| 名稱 | Description |
|---|---|
| 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 |
已淘汰.
取得或設定控制項的大小與位置,包括非用戶端元素,以像素為單位,相對於父控制項。 (繼承來源 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 |
已淘汰.
取得或設定前色。 |
| Handle |
已淘汰.
它會得到控制項綁定的視窗把手。 (繼承來源 Control) |
| HasChildren |
已淘汰.
會取得一個值,表示該控制是否包含一個或多個子控制項。 (繼承來源 Control) |
| Height |
已淘汰.
取得或設定控制點的高度。 (繼承來源 Control) |
| ImageList |
已淘汰.
取得或設定工具列按鈕控制中可用的圖片集合。 |
| ImageSize |
已淘汰.
會取得指派到工具列的圖片清單中圖片大小。 |
| ImeMode |
已淘汰.
這個成員對這個控制沒有意義。 |
| ImeModeBase |
已淘汰.
取得或設定控制的 IME 模式。 (繼承來源 Control) |
| InvokeRequired |
已淘汰.
會獲得一個值,表示呼叫者在呼叫控制項時是否必須呼叫呼叫方法,因為呼叫者使用的執行緒與該控制項建立的執行緒不同。 (繼承來源 Control) |
| IsAccessible |
已淘汰.
取得或設定一個值,指示該控制項是否對無障礙應用程式可見。 (繼承來源 Control) |
| IsAncestorSiteInDesignMode |
已淘汰.
顯示該控制點的前祖是否被設置在 DesignMode 中。 這個屬性是唯讀的。 (繼承來源 Control) |
| IsDisposed |
已淘汰.
會有一個值,表示控制權是否已被處理掉。 (繼承來源 Control) |
| IsHandleCreated |
已淘汰.
會得到一個值,表示該控制項是否有與其相關的 handle。 (繼承來源 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 |
已淘汰.
取得或設定容器內控制項的制表順序。 (繼承來源 Control) |
| TabStop |
已淘汰.
此性質對此控制無意義。 |
| Tag |
已淘汰.
取得或設定包含控制項資料的物件。 (繼承來源 Control) |
| Text |
已淘汰.
取得或設定工具列的文字。 |
| TextAlign |
已淘汰.
取得或設定文字對齊,該圖片在工具列按鈕控制上顯示的每張圖片。 |
| Top |
已淘汰.
取得或設定控制面板頂端與容器用戶端區域頂端之間的距離(以像素為單位)。 (繼承來源 Control) |
| TopLevelControl |
已淘汰.
取得沒有被其他 Windows Forms 控制項保護的父控制權。 通常,這是控制所包含的最 Form 外層。 (繼承來源 Control) |
| UseWaitCursor |
已淘汰.
取得或設定一個值,指示是否使用等待游標來控制目前的控制項及所有子控制項。 (繼承來源 Control) |
| Visible |
已淘汰.
取得或設定一個值,表示該控制項及其所有子控制項是否被顯示。 (繼承來源 Control) |
| Width |
已淘汰.
設定或設定控制寬度。 (繼承來源 Control) |
| WindowTarget |
已淘汰.
此性質對此類別無關。 (繼承來源 Control) |
| Wrappable |
已淘汰.
會取得或設定一個值,表示當工具列太小無法顯示同一行的所有按鈕時,工具列按鈕是否會繞到下一行。 |
方法
事件
| 名稱 | Description |
|---|---|
| AutoSizeChanged |
已淘汰.
當房產價值 AutoSize 變動時,會發生這種情況。 |
| BackColorChanged |
已淘汰.
當房產變更時 BackColor 發生。 |
| BackgroundImageChanged |
已淘汰.
當房產變更時 BackgroundImage 發生。 |
| BackgroundImageLayoutChanged |
已淘汰.
當房產變更時 BackgroundImageLayout 發生。 |
| BindingContextChanged |
已淘汰.
發生於 BindingContext 屬性的值變更時。 (繼承來源 Control) |
| ButtonClick |
已淘汰.
當 ToolBarButton 點擊 a 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) |
明確介面實作
| 名稱 | Description |
|---|---|
| IDropTarget.OnDragDrop(DragEventArgs) |
已淘汰.
引發 DragDrop 事件。 (繼承來源 Control) |
| IDropTarget.OnDragEnter(DragEventArgs) |
已淘汰.
引發 DragEnter 事件。 (繼承來源 Control) |
| IDropTarget.OnDragLeave(EventArgs) |
已淘汰.
引發 DragLeave 事件。 (繼承來源 Control) |
| IDropTarget.OnDragOver(DragEventArgs) |
已淘汰.
引發 DragOver 事件。 (繼承來源 Control) |