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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Capture console output

Capture console output

Scheduled Pinned Locked Moved C#
csharpcomhelp
3 Posts 2 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.
  • K Offline
    K Offline
    Kash
    wrote on last edited by
    #1

    I am trying to capture the output from a function that computes some data then draw this in a text box. The following link does this for a .exe but I would like to do this for an owner-process. http://www.codeproject.com/csharp/LaunchProcess[^] Your help is appreciated. Kash

    S 1 Reply Last reply
    0
    • K Kash

      I am trying to capture the output from a function that computes some data then draw this in a text box. The following link does this for a .exe but I would like to do this for an owner-process. http://www.codeproject.com/csharp/LaunchProcess[^] Your help is appreciated. Kash

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      Take a look at this[^] article. Basically, it does a Process.Start and then redirects console I/O to display it in a textbox. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

      K 1 Reply Last reply
      0
      • S S Senthil Kumar

        Take a look at this[^] article. Basically, it does a Process.Start and then redirects console I/O to display it in a textbox. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

        K Offline
        K Offline
        Kash
        wrote on last edited by
        #3

        Hi Senthil, Thanks for that. This works fine for writing data within C# to the shellcontrol. However, I am trying to capture the I/O from a dll written in another language. I can usually capture this by using AllocConsole(). Is there a way to do this in your control? For example: my dll subroutine is called aTest() and is declared as a void. aTest() merely outputs data to the console.

        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