System.Windows.Forms.MenuItem.PerformClick Method

Generates a Control.Click event for the System.Windows.Forms.MenuItem, simulating a click by a user.

Syntax

public void PerformClick ()

Remarks

You can use this menu to activate a menu item through code without passing any event information. For example, if you want to activate a menu item based on an action that occurs in your application, you can call the MenuItem.PerformClick method for that System.Windows.Forms.MenuItem.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0