Consider:
private void cmdOpenPDF_DoubleClick(object sender, EventArgs e)
{
string path1 = @"Z:\Google Docs\Documents";
string path2 = docIDTextBox.Text;
string path3 = ".pdf";
Path.Combine(path1,path2,path3);
System.Diagnostics.Process.Start(Path.Combine(path1, path2, path3));
}
I am trying to use the above code to open a PDF file that is on the Z: drive which is a virtual drive.
When I try this I get the following:
win32 exception was unhandled:
The system cannot find the file specified
I have no idea what that means or what is wrong with my code =/. The path is valid, and I can get it to open without using the textbox.
Path.Combinetakes only two parameters how come you are giving 3. do you mean to say anithing else or this is your own class to combine path. Please post a clean code. What is the sixth line actually doing in your code.