I got following problem my app open file in subdirectory of directory where it is executed, subdirectory is called sample and it contains files
example.raf (example extension, non signigficant)
background.gif
example.raf contains relative path to background.gif (in this case only file name cause the files is in same directory as raf) and opening of RAF causes application to read and display background.gif, when i use OpenFileDialog to load RAF file everything is alright, image loads correctly. I know that open file dialog changes in some way current working directory but i was unable to recreate this without calling open file dialog
Unfortunately in case when i call raf reading method directly from code, without supplying path to file form OpenFileDialog like this
LoadRAF("sample\\example.raf");
in this case i got problem, app try to load image from ExecutablePath and not from subdirectory which contains RAF file and image. Ofcourse it is normal behaviour but in this case it is highkly unwanted. It is required to handle both realtive and absolute type of paths in my app, so what should i do to solve this, how to change ExecutablePath or what other thing i can do to make this work at least as in case of OpenFileDialog?
Thanks In Advance best regards MoreThanChaos