public void Connect() { TClient.Connect(IPAddress.Parse(IP), Variables.Port); // Connect to the server Stream = TClient.GetStream(); // Get the server stream PacketThread.Start(); // Start the packet update thread Variables.MainForm.IsClientConnected = true; }