Menu::FindMenuItem Method (Int32, IntPtr)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the MenuItem that contains the value specified.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
MenuItem^ FindMenuItem(
	int type,
	IntPtr value
)

Parameters

type
Type: System::Int32

The type of item to use to find the MenuItem.

value
Type: System::IntPtr

The item to use to find the MenuItem.

Return Value

Type: System.Windows.Forms::MenuItem^

The MenuItem that matches value; otherwise, null.

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

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

System.Security.Permissions::UIPermission

for controls to call this method. Associated enumeration: UIPermissionWindow::AllWindows

.NET Framework
Available since 1.1
Return to top
Show: