Set process object = current app?

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

    Set process object = current app?

    Hello,
    I would like to instance a new System.Diagnost ics.Process object that is the
    current application, but I can't see a quick way of doing this. I know how
    to "start" a process, but it's already running. Do I really need to iterate
    through the collection of processes? And if so, how do I know which is the
    one I'm "in" (i.e. the user may have run more than one occurrence)?

    Thanks


  • Tom Porterfield

    #2
    Re: Set process object = current app?

    james wrote:
    Hello,
    I would like to instance a new System.Diagnost ics.Process object that is
    the current application, but I can't see a quick way of doing this. I
    know how to "start" a process, but it's already running. Do I really need
    to iterate through the collection of processes? And if so, how do I know
    which is the one I'm "in" (i.e. the user may have run more than one
    occurrence)?
    System.Diagnost ics.Process proc =
    System.Diagnost ics.Process.Get CurrentProcess( );
    --
    Tom Porterfield

    Comment

    • james

      #3
      Re: Set process object = current app?


      "Tom Porterfield" <tpporter@mvps. orgwrote in message
      news:%23KgdhQL6 GHA.3508@TK2MSF TNGP06.phx.gbl. ..
      james wrote:
      >Hello,
      >I would like to instance a new System.Diagnost ics.Process object that is
      >the current application, but I can't see a quick way of doing this.
      >
      System.Diagnost ics.Process proc =
      System.Diagnost ics.Process.Get CurrentProcess( );
      Knew it would be simple! Thanks,
      James.


      Comment

      Working...