title: Retrieving "invalid" value from a NumericUpDown Validating event
body: <p>When the user enters a value above <code>numericUpDown.Maximum</code>, the control's value is automatically set to the maximum. I'd like to display a MessageBox when this occurs, but I'm not able to do that because <code>control.Value</code> and <code>control.Text</code> already contain the automatically set value, maximum, when <code>Validating</code> event is raised.</p>
  
  <pre><code>private void numericUpDown_Validating(object sender, System.ComponentModel.CancelEventArgs e)
  {
         NumericUpDown control = sender as NumericUpDown;
         decimal newValue = control.Value;
  
         // decimal newValue;
         // decimal.TryParse(control.Text, out newValue)
  
         if (newValue &gt; control.Maximum || newValue &lt; control.Minimum)
         {
              // MessageBox
  
          }
  
  }
  </code></pre>
  
  <p>Thanks</p>