# Adding an Icon to a Menu Item

Get started with Menus and Toolbars for WinForms. Create versatile menus and docking/floating toolbars. See more in documentation here.

## Content



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:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
'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')
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
//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");
```

DOC-DETAILS-TAG-CLOSE

## See Also

[Adding a Menu Item Before the Current Menu Item](/componentone/docs/win/online-menus-toolbar/menusandtoolbarsforw2/menutasks/addingamenuitembefor)