private void Auto_Click(object sender, EventArgs e) { this.Close(); AutoMode auto = new AutoMode(serialPort); auto.VisibleForm(); }