private void button1_Click(object sender, EventArgs e) { ClientStatus.client = new TcpClient(); ClientStatus.serverip = IPAddress.Parse(textBox1.Text);; try { ClientStatus.client.Connect(ClientStatus.serverip, 50000); } catch (Exception ee) { MessageBox.Show("Server not found\r\n" + "Check the server IP again!"); return; } Form_Recipe form_Recipe; ClientStatus.Connect(); form_Recipe = new Form_Recipe(this); form_Recipe.Show(); this.Hide(); }