I'm setting width and height variables on my form using numericUpDowns. Range is 1-100 for both.
Have a third numericUpDown on the same form which I'd like to be no larger than the larger of the width and height.
Is this possible? How can I do it?
Printable View
I'm setting width and height variables on my form using numericUpDowns. Range is 1-100 for both.
Have a third numericUpDown on the same form which I'd like to be no larger than the larger of the width and height.
Is this possible? How can I do it?
I am not sure I understand what exactly you want to do but I will try to give it a shot. lol.
The NumericUpDown has a .Value property, a .Maximum, and a .Minimum property. Just use those to set the values for the other NumericUpDown's...
Code:if (NumericUpDown1.Value > NumericUpDown2.Value)
{
NumericUpDown3.Maximum = NumericUpDown1.Value;
}
else
{
NumericUpDown3.Maximum = NumericUpDown2.Value;
}