Displaying Command Prompt on Windows Forms

we currently have console application that has to be integrated into our newer Winforms application. The output should be displayed on the Windows Form. What is the simplest solution with the minimum amount of digging into the code?
Any ideas? Is there some kind of command prompt control where the command prompt window can be displayed?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You could redirect the standard output from the process that runs your command line and post it on your form.

I think a bit of searding onr redirect stdout would turn up lots of examples
One such here...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sorry - example was vb.net but I;m sure you get the idea.....
käµfm³d 👽Commented:
You could launch the console application via System.Diagnostics.Process, redirect the output, then capture and display that output in a textbox. Here's a C# example:
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo();

info.FileName = @"C:\path\to\console\app.exe";
info.Arguments = "argumen1 argument2";
info.UseShellExecute = false;
info.RedirectStandardOutput = true;

System.Diagnostics.Process p = System.Diagnostics.Process.Start(info);

this.textBox1.Text = p.StandardOutput.ReadToEnd();

Open in new window

Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

How about hosting the console in your winforms?

käµfm³d 👽Commented:
How about hosting the console in your winforms?
For that approach, you'll have to change the call to WaitForInputIdle() to a Sleep() call (or some other mechanism which will give the process enough time to acquire its window handle). Console applications don't have a message pump like forms apps do, and WaitForInputIdle is dependent on a message pump.
Rose BabuSenior Team ManagerCommented:

here is  a sample projects for command prompt custom cotrol.

this may help you.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.