How to know if an exe file opened is cancelled?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kurtzky
    New Member
    • Nov 2008
    • 26

    How to know if an exe file opened is cancelled?

    Hi guys. I used System.Diagosti cs.Process.Star t to open/execute an executable file (.exe) in C# (using VS 2003). I have "cancel" and "ok" buttons in that exe file. How would I know if the "cancel" button in that .exe file has been clicked? Thanks. :D
  • vinci
    New Member
    • Aug 2006
    • 62

    #2
    You want to monitor which button is clicked form another app?
    Just want to clarify what you want to do..
    e.g:
    1st App opens or executes another Executable (2nd App) which has OK and Cancel buttons..
    now when you click the cancel button in 2nd app, you want to know from 1st app which button is clicked?

    Is this what you are trying to do?

    Cheers,

    Comment

    • kurtzky
      New Member
      • Nov 2008
      • 26

      #3
      yes, exactly..is it possible?

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        You could try doing something with the return value? That's a bit of funny business, but it would really only effect old dos things.

        In that .exe with the ok/cancel, have the main() function return an int.
        (0 is traditionaly used as "success")

        Comment

        Working...