Receive argument in Form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Elliot

    Receive argument in Form

    Process.Start(" WindowsFormsApp lication1.exe", "hi") to call app.exe to be
    executed, then how to receive the argument "hi" in the Form?

    Any idea would be appreciated.

  • Peter Morris

    #2
    Re: Receive argument in Form

    Environment.Get CommandLineArgs ()


    Comment

    • Peter Duniho

      #3
      Re: Receive argument in Form

      On Wed, 25 Jun 2008 13:19:04 -0700, Peter Morris
      <mrpmorrisNO@SP AMgmail.comwrot e:
      Environment.Get CommandLineArgs ()
      And alternatively, you can just make your Main() method the overload that
      takes the arguments as parameters (as a string[] parameter) and inspect
      them there.

      Pete

      Comment

      • Elliot

        #4
        Re: Receive argument in Form

        Great. Thank you.


        "Peter Duniho" <NpOeStPeAdM@nn owslpianmk.comw rote in message
        news:op.udb6j3w p8jd0ej@petes-computer.local. ..
        On Wed, 25 Jun 2008 13:19:04 -0700, Peter Morris
        <mrpmorrisNO@SP AMgmail.comwrot e:
        >
        >Environment.Ge tCommandLineArg s()
        >
        And alternatively, you can just make your Main() method the overload that
        takes the arguments as parameters (as a string[] parameter) and inspect
        them there.
        >
        Pete

        Comment

        Working...