There is a NumericUpDown, which is set to the maximum value:
this.DimCountUpDown.Maximum = new decimal(new int[] { 10000, 0, 0, 0});
I need to track when the user enters more than 10,000,000 from the keyboard and give him the corresponding notification. I try to do this:
private void DimCountUpDown_KeyUp(object sender, KeyEventArgs e) { if (DimCountUpDown.Value > 10000) { MessageBox.Show("ΠΠ½Π°ΡΠ΅Π½ΠΈΠ΅ Π½Π΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ ΠΏΡΠ΅Π²ΡΡΠ°ΡΡ 10000", "ΠΡΠΈΠ±ΠΊΠ° Π²Π²ΠΎΠ΄Π°"); DimCountUpDown.Value = 10000; } }
However, before getting here the entered value (for example, 10001) is automatically set to a maximum (10,000) and, accordingly, the condition does not work ...
this.DimCountUpDown.Maximum = ...
in general? - VladDthis.DimCountUpDown.Maximum = decimal.MaxValue;
Well, or for example, the value of 10001 should be enough. - VladD