Properties.Resources icon name does not appear in intellisense

I am trying to make a thumbnail toolbar for which I need an icon. Therefore, I added the icon using the solution explorer to the resource folder. Now, when I do Properties.Resources, the icon name does not appear. The code can be found here:

Problem with displaying the icon bar in .net 3.5 form

+3
source share
3 answers

You also need to add the icon to the Resource.resx file. Open it in Visual Studio and drag the icon into the resx icon menu and it will become available.

+5
source

As suggested by @fletcher, you need to add an icon to the file Resources.resx.

  • Resources.resx β†’ YourProject β†’ . , Resourses.resx

  • YourProject . "-".

. Icon .

.

0

"/" / "" "".

Press "Combobox", select "Images" (by default its "String").

Click Add Resources. Click "Add Existing File." Select the image you want to add.

Once the image has been added to the Resources folder, you can use it.

Example: btn1.Image = Properties.Resources.Stop; // (Stop - image name)

0
source

Source: https://habr.com/ru/post/1760485/


All Articles