C# Windows Form .Net and DOS Console -


I have a windows form that executes the batch file. I want to transfer everything in my console to a panel in my panel, how can I do this? How can my dos console communicate with my windows form panel ???

Thanks

You can call dos or batch programs from your form application And can redirect the output to the string:

 using  (var p = new System.Diagnostics.Process ()) {p.StartInfo. UseShellExecute = false; P.StartInfo.RedirectStandardOutput = true; P.StartInfo.FileName = PathToBatchFile; P.StartInfo.Arguments = args; P. Start (); String o = p.StandardOutput.ReadToEnd (); P.WaitForExit (); }  

Comments

Popular posts from this blog

delphi - Mouseover hint for TChart series value -

c++ - Linux and clipboard -

How to Create Master-Details view using Asp.Net MVC framework -