I got a client that's connected to a server. The client is made to try connecting to the server as soon as the client form loads, but if the server is offline, it will not open the form before it finds out that there is no connection.
I guess this is because of some Background worker, but I haven't worked much with it, so I was curious if anyone have a hint to how I can make the form show BEFORE it tries to connect to the Server.
Since it's supposed to happen by itself when the form loads, we put it in the Form Load event.
Code Snip:
private void Form1_Load(object sender, EventArgs e)
{
try
{
ConnectToServer();
}
catch (Exception)
{
SetDisconnected();
}
}Any advice?
Kind Regards
- Theipthus.