S
Stephan Moeller
Hi,
I want to stop my Forms-Application from the constructor
of the form-class.
I try to make some connections in the constructor. If
there are some erros
I want to stop the application.
Now I tried a few thinks:
this.Close();
which has no effect, because the Form is not open in the
constructor.
The form opens.
Application.Exit();
has also no effect. The Form still opens.
System.Threading.Thread.CurrentThread.Abort();
throws an exception which I can´t catch.
How can I stop my program in the constructor without any
errors ?
Thanx and regards
Stephan
I want to stop my Forms-Application from the constructor
of the form-class.
I try to make some connections in the constructor. If
there are some erros
I want to stop the application.
Now I tried a few thinks:
this.Close();
which has no effect, because the Form is not open in the
constructor.
The form opens.
Application.Exit();
has also no effect. The Form still opens.
System.Threading.Thread.CurrentThread.Abort();
throws an exception which I can´t catch.
How can I stop my program in the constructor without any
errors ?
Thanx and regards
Stephan