Click here to Skip to main content
15,795,581 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi all,

I'm currently working on a program using Visual Studio 2008, C#, windows form application.

I stored a folder of images in my project folder.
When my program works, it will load the images from the folder.

The problem is, if i copy the whole project folder to another computer.
I'll have to reset the pathway of the folder in the program again.

So, I'm wondering, if there is a way for the program to locate the folder within the project folder, regardless of where the folder is stored?

1 solution

you can use this variable to get the application directory
Share this answer
Fullstackur 24-Jul-10 15:01pm    
Thanks, i got it.

One more qxn
The variable u gave show the debug folder every time i run the program,is there any way that i access the resources folder instead?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900