Direct console output to a window
-
Anyone know where I could find a sample app that will run a console app & display its output in a windows form?
-
Anyone know where I could find a sample app that will run a console app & display its output in a windows form?
Daniel Bright wrote: Anyone know where I could find a sample app that will run a console app & display its output in a windows form? Do you want the same identical output on both the console and the Win Form?
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
-
Anyone know where I could find a sample app that will run a console app & display its output in a windows form?
Use the
System.Diagnotics.ProcessStartInfo
class, set theUseShellExecute
property to false, and theRedirectStandardInput
,RedirectStandardError
andRedirectStandardOutput
properties to true. You can then use theStandardInput
,StandardError
andStandardOutput
properties of theProcess
object to send input to the program and read the output.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Daniel Bright wrote: Anyone know where I could find a sample app that will run a console app & display its output in a windows form? Do you want the same identical output on both the console and the Win Form?
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein