David,
As I said in my previous reply, you need to use Application.Exit(). So, something like this in your Form's Load eventhandler:
if (ConnectionIsOffline)
{
MessageBox.Show("You are offline. Application will be closed.");
this.WindowState = FormWindowState.Minimized;
Application.Exit();
return;
}
~~Bonnie
>Hello Bonnie...
>
>I in event LOAD verify if the connection with the server this ON LINE; if the server this OFF LINE I show a message and i want to close the form.
>
>Note: my english is not very good..