X
xzzy
In the follwoing code, myProcess.StartInfo.FileName is set to a valid path:
c:\\hello.doc
The code produces the following error message: "%1 is not a valid Win32
application"
For c:\\hello.doc, I would expect the following code to open a Word document
in a normal window.
//code++++++++++++++++++++++++++++++++
Process myProcess = new Process();
try
{
LinkButton btnClicked = (LinkButton)sender;
int myID = 1;
myClass.GetByID(myID);
myProcess.StartInfo.FileName = myClass.myDirectory + myClass.myFileName;
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal;
myProcess.StartInfo.CreateNoWindow = false;
myProcess.Start();
}
catch (Exception ex)
{
//end code++++++++++++++++++++++++++++++++
Thank you,
John
c:\\hello.doc
The code produces the following error message: "%1 is not a valid Win32
application"
For c:\\hello.doc, I would expect the following code to open a Word document
in a normal window.
//code++++++++++++++++++++++++++++++++
Process myProcess = new Process();
try
{
LinkButton btnClicked = (LinkButton)sender;
int myID = 1;
myClass.GetByID(myID);
myProcess.StartInfo.FileName = myClass.myDirectory + myClass.myFileName;
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal;
myProcess.StartInfo.CreateNoWindow = false;
myProcess.Start();
}
catch (Exception ex)
{
//end code++++++++++++++++++++++++++++++++
Thank you,
John