how can get start path at load time ?
-
Hi, I have created a file association in my C# program, but it just opens my program and doesnt actually load the file. What should I do? Thanks,
your app will get launched and the file will be in the CommandLine arguments. Use one of: - the args parameter of static Main - Environment.GetCommandLineArgs() and add code to open the file. BTW: if you select multiple files in Win Explorer and double-click one of them, they will all appear (in random order) as command line args. :)
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips: - use PRE tags to preserve formatting when showing multi-line code snippets - before you ask a question here, search CodeProject, then Google
-
your app will get launched and the file will be in the CommandLine arguments. Use one of: - the args parameter of static Main - Environment.GetCommandLineArgs() and add code to open the file. BTW: if you select multiple files in Win Explorer and double-click one of them, they will all appear (in random order) as command line args. :)
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips: - use PRE tags to preserve formatting when showing multi-line code snippets - before you ask a question here, search CodeProject, then Google