How to get the image path from Resource file in c# windows forms?
19,816
Try this:
var filePath = System.Reflection.Assembly.GetExecutingAssembly()
.Location + @"\..\..\Resources\bar.png";
If your image is a valid resource, you can access it through: Properties.Resources
Author by
Malini
Updated on June 09, 2022Comments
-
Malini almost 2 years
I want to get the image from Resource folder in c# windows application? already i tried in different ways. But i dint get the correct solution.
i need the path: "c:test\windowsapp\Resouces\bar.png" instead of start-up and executable path etc.Help me
-
Malini almost 12 yearsYeah,I tried that one already. thanks for ur reply. I wanna split the path and add "Resources\test.png".