Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close Form in Load
Message
From
06/05/2005 15:41:05
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP1
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01011660
Message ID:
01011771
Views:
14
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..
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform