Hendo
November 18th, 2007, 02:36 PM
Hey, I have successfully run an external application with the Process class, but I can't seem to use the close method. If I use:
Process.Start(@"C:\WINDOWS\system32\calc.exe");
I only get the option to start not to close, but it builds sucessfully.
If I use this:
Process myProcess;
myProcess.Start(@"C:\WINDOWS\system32\calc.exe");
I do get the Close method to use later, but it doesn't build, and I get this error:
Static member 'System.Diagnostics.Process.Start(string)' cannot be accessed with an instance reference; qualify it with a type name instead
Also I have added the System.Diagnostics namespace.
Any help is appreciated
Thanks
Process.Start(@"C:\WINDOWS\system32\calc.exe");
I only get the option to start not to close, but it builds sucessfully.
If I use this:
Process myProcess;
myProcess.Start(@"C:\WINDOWS\system32\calc.exe");
I do get the Close method to use later, but it doesn't build, and I get this error:
Static member 'System.Diagnostics.Process.Start(string)' cannot be accessed with an instance reference; qualify it with a type name instead
Also I have added the System.Diagnostics namespace.
Any help is appreciated
Thanks