ToolBarArray.MouseClick 事件

定義

發生於使用滑鼠按一下控制項時。Occurs when the control is clicked by the mouse.

public:
 event System::Windows::Forms::MouseEventHandler ^ MouseClick;
public event System.Windows.Forms.MouseEventHandler MouseClick;
member this.MouseClick : System.Windows.Forms.MouseEventHandler 
Public Custom Event MouseClick As MouseEventHandler 
Public Event MouseClick As MouseEventHandler 

事件類型

MouseEventHandler

備註

當指標停留在圖形上時,按一下滑鼠按鍵,通常會從控制項引發下列一連串的事件:Clicking a mouse button when the pointer is over a shape typically raises the following series of events from the control:

MouseDown

Click

MouseClick

MouseUp

只要按下使用者作業系統的滑鼠設定所決定的兩次按鍵,就會產生 MouseDoubleClick 事件,而不會產生第二個 MouseClick 事件。Two clicks that occur close enough in time, as determined by the mouse settings of the user's operating system, will generate a MouseDoubleClick event instead of the second MouseClick event.

注意

Click 事件是圖形上較高層級的事件。Click events are logically higher-level events of a shape. 這些通常是由其他動作所引發,例如在圖形具有焦點時按下 ENTER 鍵。They are often raised by other actions, such as pressing the ENTER key when the shape has focus.

如需如何處理事件的詳細資訊,請參閱 處理和引發事件For more information about how to handle events, see Handling and Raising Events.

注意

Microsoft.VisualBasic.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. 在大多數情況下,這些函式和物件會複製在 .NET Framework 其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才會需要這些函式和物件。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

適用於

另請參閱