Hi,
I am using NI Numeric Edit Boxes on a form to restrict user input to numeric values within a certain range. I have set the "OutOfRangeMode" property for each of the boxes to "Throw Exception" (as this is more appropriate for my application), but how do I detect / handle this exception programmatically (Visual Basic.Net) without a Try/Catch statement???? At the moment, an "unhandled exception" message is displayed when the input to the edit box is out of range or negative (see below) and I would like to have a custom message box (depending on the edit box in question) and set the value of the edit box to a specific number when an exception is thrown.
Thanks to anyone who can help.
************** Exception Text **************
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: value
at NationalInstruments.Restricted.NumericControl.a(Double , Action , Boolean )
at NationalInstruments.Restricted.NumericControl.SetValue(Double value, Action action)
at NationalInstruments.UI.WindowsForms.NumericEdit.a(Double , Action )
at NationalInstruments.UI.WindowsForms.NumericEdit.a(String , Boolean , Action )
at NationalInstruments.UI.WindowsForms.NumericEdit.OnLeave(EventArgs e)
at System.Windows.Forms.Control.NotifyLeave()
at System.Windows.Forms.ContainerControl.UpdateFocusedControl()