I want to add a picture to my program but you need the directory for the picture for that (by my understanding). How do I make the program know where it self is and find the picture that I want to add. Note I can't set the directory to where it is on my computer as I want the program to be usable on other computers.
Asked
Active
Viewed 53 times
-2
-
1Unclear to me what you are asking, but you can just add an image into your project's resources and use it. It gets compiled into the exe. – LarsTech Oct 04 '17 at 16:00
-
1It sounds like you either want to use a relative path to a resource (which is easy -- that's what Lars is referring to), or you want your application to discover its own installation path. If that's not the case, please try to explain you requirement in more detail. – 15ee8f99-57ff-4f92-890c-b56153 Oct 04 '17 at 16:00