private void KeyPressEventHandler(object sender, System.Windows.Forms.KeyPressEventArgs e) { try { if (!IsValidCharacter(e.KeyChar)) { e.Handled = true; } } catch (Exception ex) { GlobalRegistry.UIExceptionNotifier.Notify(ex, "", "Error "); } }