private void txtPageWidth_TextChanged(object sender, EventArgs e) { if (txtPageWidth.Text.Trim() != "" & IsValidNumber(txtPageWidth.Text)) { if ((System.Convert.ToInt32(txtPageWidth.Text) > 100 | System.Convert.ToInt32(txtPageWidth.Text) == 0)) { Properties.Settings.Default.PageWidth = Int32.Parse(txtPageWidth.Text); Properties.Settings.Default.Save(); parent.ReScale(); } } else { MessageBox.Show("Invalid Page Width. You may only use numeric characters."); } }