Re: [Mono-winforms-list] how to open file

2010-12-11 Thread Stifu
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 di

Re: [Mono-winforms-list] how to open file

2010-12-11 Thread Anubhava Dimri
Dear Sir, I have a pdf which is with the application. after that i m tring to execute mono application in MAC os. but it not works. Dim b As DirectoryInfo = New DirectoryInfo(Application.StartupPath) Dim f As FileInfo() = b.GetFiles("*.pdf") MessageBox.Show(f.Leng

Re: [Mono-winforms-list] how to open file

2010-12-10 Thread Anubhava Dimri
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-tp3081832p3083056.html Sent from the M

Re: [Mono-winforms-list] how to open file

2010-12-10 Thread Stifu
Hi, Is there even a C drive on Mac in the first place? And can't you use a relative path, rather than an absolute one? Also, use Path.DirectorySeparatorChar, rather than hard-coding Windows separators (ie: avoid "foo\\bar" or @"foo\bar"). Do it like this: string myPath = "myFolder" + Path.Direct

Re: [Mono-winforms-list] how to open file

2010-12-10 Thread Rafael Teixeira
MacOSX, as Linux, doesn't have drive letters ("C:"), also Process.Start depends on having a registered (mapped) program when trying to open a data file like a .pdf Rafael "Monoman" Teixeira --- "We live in a world operated by science and technology. We have also

[Mono-winforms-list] how to open file

2010-12-10 Thread Anubhava Dimri
Hello Everybody, I have generate the problem while open File in MAC. it works successfully in windows. System.Diagnostics.Process.Start("C:\\help.pdf" ); -- View this message in context: http://mono.1490590.n4.nabble.com/how-to-open-file-tp3081832p3081832.html Sent from the Mono - WinForms mai