![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Jun 2005
Location: Amittyville
Posts: 60
Rep Power: 4
![]() |
Finding the location of the application
I want to find the folder where the application is located so that I can access a file that is in that same folder, but I do not want to do the usual naming the folder itself I want to get it through code so it can be moved easily. Thanx in advance
|
|
|
|
|
|
#2 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
I usually use Application.StartupPath.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Usually, you can just give the path relative to the program. For example, Open("Foo.jpg") (assuming Open is a function and Foo.jpg is in the same folder as the program) should work.
|
|
|
|
|
|
#4 |
|
Programmer
Join Date: Jun 2005
Location: Amittyville
Posts: 60
Rep Power: 4
![]() |
that will work but I need to open files other than this one which will change the active directory making it look for the file in the folder of the file I opened... yah. But Application.StartupPath worx perfectly!
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|