I have an urgent problem:
I try to load an image with relative path to my Release or after installation with relative path to my Program installation folder, but I always get an System.Reflection.TargetInvocationException in my .exe
public Image Play_n = Image.FromFile(@"\buttons\play_n.jpg");
public Image Play_n = Image.FromFile("\buttons\\play_n.jpg");
both versions do not work.
What can be the reason?
The folder "buttons" is located in the project folder under bin\release\buttons on the same level as my .exe
Do I have to make some additional settings in the IDE so that relative paths are recognized?
What means do I have to detect, which actual path is built from the relative path?
Thank you very much in advance for helping!