I have an old VB.NET(.NET8) winforms app which loads some resources on sign in using
Image.FromFile("resources\\myImage.png"
This is loaded from the resources sub folder in the runtime directory - so far so good. I also allow the user to change the "focus" of the application, which loads a different image, again so far so good - all of the images are correctly found.
However, if I show the Winforms report viewer, the Directory.CurrentDirectory is reset from the correct runtime folder to the folder which contained the report (which is a UNC share)
This means that loading the images fails - it's looking in the reports directory rather than the runtime directory.
Any one have any ideas on how to solve this?