Help needed| Visual C# 2015 allow user to load custom image as resource
Posted on 2016-10-16
I am writing an application in Visual C# 2015 that produces reports. On the header I display a default logo (this uses a linked resource that is installed during install).
I want to enable the user to select their own image to use in the header. Can the resource file be replaced at runtime by user selected image.
Alternately, I was thinking of using a "setting" that is string which initially has say "Use Resource Image". If the user selects their won image then I change the setting to path and name of their image.
In the rendering part of the report I check the setting and use either the resource or user selected file dependent on the setting value.
I think this would work but if they inadvertently move their image file the program will have issues. It would be good if the program could load their image as an embedded image so it is always available.
Any help much appreciated.