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 DoubleClick Click 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.