ComponentOne Menus and Toolbars for WinForms
Adding an Icon to a Menu Item
Menus and Toolbars for WinForms Task-Based Help > Menu Tasks > Adding an Icon to a Menu Item

You can add an icon to a menu item at design time or through code.

To add an icon to a menu item programmatically

Use the following code to add an icon to a menu:

To write code in Visual Basic

Visual Basic
Copy Code
'Create a new instance of a Bitmap and assign it to the Image property of the Command Object
c1Command1.Image = new System.Drawing.Bitmap(@'D:\componentOne\Images\App.ico')

To write code in C#

C#
Copy Code
//Create a new instance of a Bitmap and assign it to the Image property of the Command Object
c1Command1.Image = new System.Drawing.Bitmap(@"D:\componentOne\Images\App.ico");
See Also