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

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -