MenuItemArray.Click 事件


發生於按一下 MenuItem 中的 MenuItemArray 時。Occurs when a MenuItem in a MenuItemArray is clicked.

 event EventHandler ^ Click;
public event EventHandler Click;
member this.Click : EventHandler 
Public Custom Event Click As EventHandler 
Public Event Click As EventHandler 




事件會將 Click 傳遞 EventArgs 至其事件處理常式。The Click event passes an EventArgs to its event handler. 因此,它只會指出已發生點擊。Therefore it only indicates that a click has occurred. 如果您需要更多特定的滑鼠資訊 (按鈕、點擊次數、滾輪旋轉或位置) ,請使用 MouseClick 事件。If you need more specific mouse information (button, number of clicks, wheel rotation, or location), use the MouseClick event. 不過, MouseClick 如果按一下是由滑鼠以外的動作所造成,例如按下 enter 鍵,就不會引發事件。However, the MouseClick event will not be raised if the click is caused by action other than that of the mouse, such as pressing the ENTER key.

按兩下是由使用者作業系統的滑鼠設定所決定。A double-click is determined by the mouse settings of the user's operating system. 使用者可以設定按下滑鼠按鍵的間隔時間,這應該視為按兩下,而不是兩次按一下。The user can set the time between clicks of a mouse button that should be considered a double-click instead of two clicks. Click每次按兩下控制項時,就會引發事件。The Click event is raised every time that a control is double-clicked. 例如,如果您有 Click 控制項之和事件的事件處理常式 DoubleClickClick DoubleClick 當按兩下控制項並呼叫這兩種方法時,就會引發和事件。For example, if you have event handlers for the Click and DoubleClick events of a control, the Click and DoubleClick events are raised when the control is double-clicked and both methods are called. 如果按兩下控制項,而該控制項不支援 DoubleClick 事件,則 Click 事件可能會引發兩次。If a control is double-clicked and that control does not support the DoubleClick event, the Click event might be raised two times.

如需如何處理事件的詳細資訊,請參閱 處理和引發事件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.NET Framework 的其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework.NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework.NET Framework 實作有顯著差異時,才需要這些項目。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework.NET Framework implementation.