Rufst du eventuell noch wo anders die Application.Exit() Funktion auf???
Zitat aus der MSDN:
Zitat |
The Form..::.Closed and Form..::.Closing events are not raised when the Application..::.Exit method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the Form..::.Close method for each open form individually before calling the Exit method. |
Soll heißen wenn du Application.Exit() aufrufst, werden FormClosed und FormClosing nicht ausgeführt! Das könnte ein Grund sein.
Ach übrigens, du brauchst Application.Exit() nicht aufrufen wenn das Hauptformular geschlossen wird, dann beendet das Programm nämlich von alleine. Und wenn das da unten nicht von deinem Hauptformular ist würd ich den Namen formMain in etwas anderes ändern
Gruß
Preli