private void StartButton__Click(object sender, EventArgs e) { bool bConv; int lowNumber = 0; int highNumber = 0; lowNumber = Int32.Parse(this.lowTextBox.Text); highNumber = Int32.Parse(this.highTextBox.Text); if (lowNumber < 1 | highNumber > 100) { MessageBox.Show("The numbers are invalid"); } else { GameForm gameForm = new GameForm(lowNumber, highNumber); gameForm.ShowDialog(); } }