For a button, for example, ImageList is simply created, files are thrown in there, then in the button properties we specify the desired ImageList and the index of the icon. For MenuStrip, there is no ImageList field in the property inspector. I tried to assign my hands in the constructor - nothing sensible happened. Added a picture to the resources - also nothing. Tell me what am I doing wrong? Thank you in advance.

    1 answer 1

    In general, the simplest way to add an icon to a menu item is to add it to Resources.resx and set it in the Image property of your item. If you still intend to use ImageList, then you can use, for example, such code in the constructor:

    for (int i = 0; i < menuStrip1.Items.Count; i++) { menuStrip1.Items[i].Image = imageList1.Images[i]; }