[]
        
(Showing Draft Content)

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

'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#

//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

Adding a Menu Item Before the Current Menu Item