Greetings everyone.
I'm developing a desktop app and I'm trying to show the user an
OpenFileDialog so he/she can open a file of a certain type.
Now I would like to define the initial directory of the OpenFileDialog but
the problem is that the location of the files may vary from user to user.
I mean, I could simply define this:
dlgOpenFile.InitialDirectory = "c://Program Files/someProgram";
But that would not work if some user has his files in C:/someProgram, or
even if his drive's name isn't C:/, right?
So, I need to find out the path to <driveName>:/.../someProgram inside my
program.
I believe this is quite simple, but I'm not getting there.
Can anybody help me?
I would be very grateful...
TIA
sekhmet
I'm developing a desktop app and I'm trying to show the user an
OpenFileDialog so he/she can open a file of a certain type.
Now I would like to define the initial directory of the OpenFileDialog but
the problem is that the location of the files may vary from user to user.
I mean, I could simply define this:
dlgOpenFile.InitialDirectory = "c://Program Files/someProgram";
But that would not work if some user has his files in C:/someProgram, or
even if his drive's name isn't C:/, right?
So, I need to find out the path to <driveName>:/.../someProgram inside my
program.
I believe this is quite simple, but I'm not getting there.
Can anybody help me?
I would be very grateful...
TIA
sekhmet