Hi there,
I wan't to run my application with argument that causes the application to
do something without showing up gui.
It works but in the end shows blank form and does not terminate (see code
snippet).

How can I terminate my application immediatly?

--------------------
public Fyrirtaekjavaki(bool keyra)
{
if (keyra)
{
LesaInnRSGGogn(true);
MessageBox.Show("Here");
Application.Exit();
}
else
InitializeComponent();
}
-------------------------

Re: How do I terminate Application immediatly by Herfried

Herfried
Wed Jan 26 03:29:54 CST 2005

"msnews.microsoft.com" <beggib@yahoo.com> schrieb:
> I wan't to run my application with argument that causes the application to
> do something without showing up gui.
> It works but in the end shows blank form and does not terminate (see code
> snippet).
>
> How can I terminate my application immediatly?
>
> --------------------
> public Fyrirtaekjavaki(bool keyra)
> {
> if (keyra)
> {
> LesaInnRSGGogn(true);
> MessageBox.Show("Here");
> Application.Exit();
> }
> else
> InitializeComponent();
> }
> -------------------------

Initialize only of the condition is true:

\\\
public static void Main()
{
if (...)
Application.Run(new MainForm());
}
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>