ToolStripMenuItem Constructor (String, Image, EventHandler, Keys)


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

Initializes a new instance of the ToolStripMenuItem class that displays the specified text and image, does the specified action when the ToolStripMenuItem is clicked, and displays the specified shortcut keys.

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

public ToolStripMenuItem(
	string text,
	Image image,
	EventHandler onClick,
	Keys shortcutKeys


Type: System.String

The text to display on the menu item.

Type: System.Drawing.Image

The Image to display on the control.

Type: System.EventHandler

An event handler that raises the Click event when the control is clicked.

Type: System.Windows.Forms.Keys

One of the values of Keys that represents the shortcut key for the ToolStripMenuItem.

Use the ToolStripMenuItem constructor to create a ToolStripMenuItem that displays text and an image, performs the specified action when clicked, and has the specified shortcut key.

.NET Framework
Available since 2.0
Return to top