Click here to Skip to main content
16,006,452 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to restore the default base path after using an open file dialog Pin
Dave Kreskowiak25-Jan-07 9:19
mveDave Kreskowiak25-Jan-07 9:19 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Dan Neely25-Jan-07 9:48
Dan Neely25-Jan-07 9:48 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Dave Kreskowiak25-Jan-07 10:26
mveDave Kreskowiak25-Jan-07 10:26 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Martin#25-Jan-07 19:40
Martin#25-Jan-07 19:40 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Dave Kreskowiak26-Jan-07 2:29
mveDave Kreskowiak26-Jan-07 2:29 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Martin#26-Jan-07 3:07
Martin#26-Jan-07 3:07 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Dave Kreskowiak26-Jan-07 14:07
mveDave Kreskowiak26-Jan-07 14:07 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Martin#28-Jan-07 22:59
Martin#28-Jan-07 22:59 
Hello Dave,

Unsure | :~
First, thank you for your time again!
I think there was a lot of misunderstanding from my side regarding to your words (like: fully qualified), because of my poor english and/or my programing skills! I actually was thinking that you don't like any kind of combining pathes for finding the exe path. Thats why I made that kind of long(useless) explination try before.

But I think there is one very important point for me which was not answered correctly, or maybe it was a wrong explination from my side.

I wrote:
Is there a designtime support for that?
Means, all the other ways (apart from System.Inviroment.CurrentDirectory) brougt me an obscure path at design time.


Dave Kreskowiak wrote:

OK. So your application builds the absolute path from Application.StartupPath and the relative path stored somewhere:

Dim path As String = Path.Combine(Application.StartupPath, "\subfolder.file.xml")

This will hold true and work no matter what folder the customer copies the .EXE file and subfolders/files to.


Ok. But I tested it for my designtime needs, and it is not working!
The problem is that most methods or properties returning pathes like: "C:\Programe\Microsoft....\VS2003\Common7\IDE", instead of: "C:\MyFolder\...".

"System.Enviroment.CurrentDirectory" is the only property I found which works during run- and designtime in the same way.

Dave Kreskowiak wrote:
THere is just about never a reason to depend on CurrentDirectory unless you're writing some kind of commandline utility.

Please let me know if this is still your last word, after my try to explain my problem a little better. Unsure | :~

So, again thanks for your time and patience! Rose | [Rose]

All the best,

Martin
AnswerRe: How to restore the default base path after using an open file dialog Pin
Martin#25-Jan-07 9:29
Martin#25-Jan-07 9:29 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Dave Kreskowiak25-Jan-07 10:27
mveDave Kreskowiak25-Jan-07 10:27 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Martin#25-Jan-07 19:36
Martin#25-Jan-07 19:36 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Dave Kreskowiak26-Jan-07 2:23
mveDave Kreskowiak26-Jan-07 2:23 
GeneralRe: How to restore the default base path after using an open file dialog Pin
Martin#26-Jan-07 3:15
Martin#26-Jan-07 3:15 
AnswerRe: How to restore the default base path after using an open file dialog Pin
Marc Clifton25-Jan-07 12:21
mvaMarc Clifton25-Jan-07 12:21 
Questiongetting the enter key to act as a button click Pin
Rocky#25-Jan-07 8:30
Rocky#25-Jan-07 8:30 
AnswerRe: getting the enter key to act as a button click Pin
Pete O'Hanlon25-Jan-07 8:42
mvePete O'Hanlon25-Jan-07 8:42 
AnswerRe: getting the enter key to act as a button click Pin
Martin#25-Jan-07 9:02
Martin#25-Jan-07 9:02 
GeneralRe: getting the enter key to act as a button click Pin
bobsugar22225-Jan-07 23:50
bobsugar22225-Jan-07 23:50 
GeneralRe: getting the enter key to act as a button click Pin
Martin#26-Jan-07 0:18
Martin#26-Jan-07 0:18 
GeneralRe: getting the enter key to act as a button click Pin
bobsugar22226-Jan-07 2:44
bobsugar22226-Jan-07 2:44 
GeneralRe: getting the enter key to act as a button click Pin
Martin#26-Jan-07 3:28
Martin#26-Jan-07 3:28 
QuestionHow to Create TCP Server reply to a client using XML file Pin
Janani Vaithyanathan25-Jan-07 7:35
Janani Vaithyanathan25-Jan-07 7:35 
AnswerRe: How to Create TCP Server reply to a client using XML file Pin
Marc Clifton25-Jan-07 8:27
mvaMarc Clifton25-Jan-07 8:27 
GeneralRe: How to Create TCP Server reply to a client using XML file Pin
Janani Vaithyanathan26-Jan-07 7:55
Janani Vaithyanathan26-Jan-07 7:55 
QuestionUsing Combo Box in a GridView Pin
rahul_spi25-Jan-07 7:19
rahul_spi25-Jan-07 7:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.