Kill own process

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

    #1

    Kill own process

    Hi,

    I' m currently developing a service that displays a window to the user
    (interactive). Now, when the user cancels the window, the whole process shall
    be killed. But how can I kill my own process in VB.NET?

    Thanks a lot
    Peter
  • Patrik Löwendahl [C# MVP]

    #2
    Re: Kill own process

    I think a counter question would be, why would you like to kill the
    process??

    It feels like fishing with dynamite.

    --
    Patrik Löwendahl [C# MVP]
    www.cshrp.net - "Elegant code by witty programmers"

    "Peter Schmitz" <PeterSchmitz@d iscussions.micr osoft.com> wrote in message
    news:BDA08693-7DCF-449D-9065-B10C39C037DA@mi crosoft.com...[color=blue]
    > Hi,
    >
    > I' m currently developing a service that displays a window to the user
    > (interactive). Now, when the user cancels the window, the whole process
    > shall
    > be killed. But how can I kill my own process in VB.NET?
    >
    > Thanks a lot
    > Peter[/color]


    Comment

    • Davy Brion

      #3
      Re: Kill own process

      Peter Schmitz wrote:[color=blue]
      > Hi,
      >
      > I' m currently developing a service that displays a window to the user
      > (interactive). Now, when the user cancels the window, the whole process shall
      > be killed. But how can I kill my own process in VB.NET?
      >
      > Thanks a lot
      > Peter[/color]

      System.Diagnost ics.Process.Get CurrentProcess( ).Kill()

      allthough if you need to kill your own process, there's most likely
      something else wrong and you should really be looking to fix that
      instead of killing the process

      Comment

      • Scott M.

        #4
        Re: Kill own process

        "End"


        "Peter Schmitz" <PeterSchmitz@d iscussions.micr osoft.com> wrote in message
        news:BDA08693-7DCF-449D-9065-B10C39C037DA@mi crosoft.com...[color=blue]
        > Hi,
        >
        > I' m currently developing a service that displays a window to the user
        > (interactive). Now, when the user cancels the window, the whole process
        > shall
        > be killed. But how can I kill my own process in VB.NET?
        >
        > Thanks a lot
        > Peter[/color]


        Comment

        Working...