Läs på engelska Redigera

Dela via


Menu.FindMenuItem(Int32, IntPtr) Method

Definition

Gets the MenuItem that contains the value specified.

C#
public System.Windows.Forms.MenuItem FindMenuItem(int type, IntPtr value);

Parameters

type
Int32

The type of item to use to find the MenuItem.

value
IntPtr

The item to use to find the MenuItem.

Returns

The MenuItem that matches value; otherwise, null.

Remarks

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.

Applies to

Produkt Versioner
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 10