ToolStripMenuItem Constructor (String^, Image^, EventHandler^, String^)

 

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

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

public:
ToolStripMenuItem(
	String^ text,
	Image^ image,
	EventHandler^ onClick,
	String^ name
)

Parameters

text
Type: System::String^

The text to display on the menu item.

image
Type: System.Drawing::Image^

The Image to display on the control.

onClick
Type: System::EventHandler^

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

name
Type: System::String^

The name of the menu item.

The following code example demonstrates a use of the ToolStripMenuItem constructor.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: