System.Windows.Forms.Menu.FindMenuItem Method

Gets the System.Windows.Forms.MenuItem that contains the value specified.

Syntax

public MenuItem FindMenuItem (int type, IntPtr value)

Parameters

type
The type of item to use to find the System.Windows.Forms.MenuItem.
value
The item to use to find the System.Windows.Forms.MenuItem.

Returns

The System.Windows.Forms.MenuItem that matches value; otherwise, null.

Remarks

To search for a System.Windows.Forms.MenuItem using a handle, pass in the Menu.FindHandle field as the type, and the handle of the System.Windows.Forms.MenuItem you want to find as the value.

To search for a System.Windows.Forms.MenuItem using a shortcut, pass in the Menu.FindShortcut field as the type, and the Shortcut value for the System.Windows.Forms.MenuItem you want to find as the value.

Requirements

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