Announcement

Collapse
No announcement yet.

Wie beende ich ein Programm sofort?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wie beende ich ein Programm sofort?

    Hi,

    ich würde gern ein Programm sofort beenden, d.h. praktisch den Prozess abschiessen und nicht wie mit Application.Exit().
    Allerdings hab ich nichts gefunden, was so ist wie Delphi's Halt!
    Gibts dazu was im Framework?
    Danke!

    Ciao

    Benni

  • #2
    Hallo,

    warum reicht <i>Application.Exit</i> nicht aus? Denn die Methode <b>Exit</b> ist ja bereits ein Notausstieg (siehe die Warnung in der Dokumentation: <i>CAUTION The Form.Closed and Form.Closing events are not raised when the Application.Exit method is called to exit your application </i>)

    Comment


    • #3
      Hallo, Herr Kosch,

      danke für Ihre Antwort. Das mit Application.Exit wußte ich gar nicht.

      Es gibt bestimmte Punkte, die nicht ausgeführt werden dürfen in einem bestimmten Fall. Mit "Halt" war das kein Problem.
      Ich hab das Problem aber nun anderweitig gelöst, indem ich die Prüfung vor Application.Run() ansetze und ggf. dies nicht ausführe. So funktioniert alles einwandfrei.

      Ciao

      Benjamin Hei

      Comment

      Working...
      X