I added three images to a file called Resource1.resx. I also added one string just for test purposes. I\'m getting this error on either the GetString or the GetObject(image
The 1st argument is wrong. But, there is already a ResourceManager created for you. You can see its code: in the Solution Explorer window open the Properties node, open the Resources.resx node and double-click the Resources.Designer.cs file.
You'll get its instance with Properties.Resources.ResourceManager
. If you added the bitmaps with Project + Properties, Resources tab (strongly recommended), you can just refer to the property by the name you gave it. Like Properties.Resources.circleGreen
. Do beware that you get a new image object each time you use the property, you may need to copy it to a variable if you use it more than once.