Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Direct console output to a window

Direct console output to a window

Scheduled Pinned Locked Moved C#
question
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Daniel Bright
    wrote on last edited by
    #1

    Anyone know where I could find a sample app that will run a console app & display its output in a windows form?

    N Richard DeemingR 2 Replies Last reply
    0
    • D Daniel Bright

      Anyone know where I could find a sample app that will run a console app & display its output in a windows form?

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      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

      D 1 Reply Last reply
      0
      • D Daniel Bright

        Anyone know where I could find a sample app that will run a console app & display its output in a windows form?

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        Use the System.Diagnotics.ProcessStartInfo class, set the UseShellExecute property to false, and the RedirectStandardInput, RedirectStandardError and RedirectStandardOutput properties to true. You can then use the StandardInput, StandardError and StandardOutput properties of the Process 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

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        1 Reply Last reply
        0
        • N Nick Parker

          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

          D Offline
          D Offline
          Daniel Bright
          wrote on last edited by
          #4

          I don't want the console to display at all, I just want all output to be directed to a textbox or something. This [^] article explains exactly how it is done in C++, I was just hoping for a C# version of it that is more simplified.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups