private void button1_Click(object sender, EventArgs e) { success = Int32.TryParse(textBox1.Text, out value); this.Close(); }