private void exitButton_Click(object sender, EventArgs e) { //this.Close(); Application.Exit(); } private void basePriceTextBox_Leave(object sender, EventArgs e) { } private void basePriceTextBox_Validating(object sender, CancelEventArgs e) { e.Cancel = false; string strMessageForBasePrice = ""; try { if (decimal.Parse(this.basePriceTextBox.Text) >= 1) { enableControls(); this.tradeInAllowanceTextBox.Focus(); } if (decimal.Parse(this.basePriceTextBox.Text) < 1) { disableControls(); } } catch (FormatException err) { strMessageForBasePrice = "Non-numeric value was entered for Base Price"; MessageBox.Show(strMessageForBasePrice + ". " + err.Message, "Data Entry Error", MessageBoxButtons.OK, MessageBoxIcon.Information); } }