When you launch from your IDE, it will set the working directory to a particular path (which you can configure in your IDE's debugging properties).
Any file paths that you use in your program will be relative to this working directory.
i checked the project property and found that the working directory is $(ProjectDir). it should be OK, right? is there a way to peek at what $(ProjectDir) represent?
The ProjectDirectory is where your code files are, not where the final .exe file is. Make sure that the .tga and .exe files are in the same place, and then try launching the exe NOT from the IDE, but from Explorer.