Tech Off Thread

4 posts

A Console In A Windows Application?

Back to Forum: Tech Off
  • User profile image
    darklotus

    Is it possible to have a console window build into a windows form? I know it sounds wierd, but i think it can be done. I would like to be able to execute any dos command from within my application.

  • User profile image
    bitmask

    The Process class allows you to redirect output to a stream you can read from your code. You might try something along the lines of the following:
    http://odetocode.com/Code/97.aspx

  • User profile image
    codepunk

    I also cover how to do this in my book although taking a different approach using COM Interop (since the chapter I did it for was on that subject).  The code is freely downloadable at http://www.samspublishing.com.  Oh, the book is called "Microsoft Visual C# .NET 2003 Developer's Cookbook".

    The ASP.NET chapter also has a little bare-bones (that needs a little work) web app that displays a command line interface in a web browser to your web server (called WebShell).

    -Mark Schmidt

  • User profile image
    darklotus

    That is exactly what i am looking for.
    Thank You!

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.