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. Interact

Interact

Scheduled Pinned Locked Moved C#
csharptutorialquestion
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.
  • N Offline
    N Offline
    nc3b
    wrote on last edited by
    #1

    Hello. Can you tell me how can I make my C# application interact with other C# or win32 applications. Thank you. I want for example to be able to get the data from a notepad or a cmd window. Thank you.

    C 1 Reply Last reply
    0
    • N nc3b

      Hello. Can you tell me how can I make my C# application interact with other C# or win32 applications. Thank you. I want for example to be able to get the data from a notepad or a cmd window. Thank you.

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      The other application has to be designed for such interaction. You can force interaction, but there is no consitent way to do that because you have to trick the application into interacting with your application. There are ways of getting properties of windows (e.g. controls), for example, the Text property of the TextBox control that Notepad (I assume) is using. However, it has been a few years since I did any C++ and I don't enough to be able to work out how it might be done any more. The Command window might be easier to deal with as the application is just interacting with StdIn, StdOut and StdErr and these can be redirected. See the System.Diagnostics.Process[^] class


      My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

      N 1 Reply Last reply
      0
      • C Colin Angus Mackay

        The other application has to be designed for such interaction. You can force interaction, but there is no consitent way to do that because you have to trick the application into interacting with your application. There are ways of getting properties of windows (e.g. controls), for example, the Text property of the TextBox control that Notepad (I assume) is using. However, it has been a few years since I did any C++ and I don't enough to be able to work out how it might be done any more. The Command window might be easier to deal with as the application is just interacting with StdIn, StdOut and StdErr and these can be redirected. See the System.Diagnostics.Process[^] class


        My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

        N Offline
        N Offline
        nc3b
        wrote on last edited by
        #3

        I was thinking of something in Diagnostics.Process thanks :D

        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