[Mono-winforms-list] how to open file

Stifu stifu at free.fr
Sat Dec 11 04:43:25 EST 2010


Of course it's not working, you hard coded the directory separator again,
re-read my previous message.

Try:

string path = Application.StartupPath + Path.DirectorySeparatorChar +
"Help.pdf";

or:

string path = Path.Combine(Application.StartupPath, "Help.pdf");

Same thing.
That way, the right directory separator char will be used depending on the
OS.

Then Process.Start(path), and see if it works...


Anubhava Dimri wrote:
> 
> Dear Sir,
> 
> Thanks For Reply and Suggetions. But Now i am Changing My Code My New Code
> Is
> 
> Process.Start(Application.StartupPath & "\Help.pdf")
> 
> But still it's not working.
> 
> 
> 

-- 
View this message in context: http://mono.1490590.n4.nabble.com/how-to-open-file-tp3081832p3083138.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.


More information about the Mono-winforms-list mailing list