[Mono-list] Launching external programs fromo mono programs

Jonathan Pryor jonpryor@vt.edu
Wed, 27 Aug 2003 21:49:20 -0400


Use System.Diagnostics.Process.  See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsProcessClassTopic.asp
http://www1.cs.columbia.edu/~lok/csharp/refdocs/System.Diagnostics/types/Process.html

And for good measure, a small example from the last URL:

              Process p = new Process("...", "...");
              p.StartInfo.UseShellExecute = false;
              p.StartInfo.RedirectStandardOutput = true;
              p.Start();
              string output = p.StandardOutput.ReadToEnd();
              p.WaitForExit();

 - Jon

On Wed, 2003-08-27 at 18:05, Jorge De Gante wrote:
> Hi everybody
> 
> 
> I need to print from a mono app, and since libgnomeprint for mono it's
> not ready yet I want to launch some external programs like lpr to print
> a document.
> 
> The question is how can I lacuch an external program from a mono
> program?
> 
> Thanks in advance.
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list