Thread: numericUpDown to affect another

  1. #1
    Registered User
    Join Date
    Feb 2010

    numericUpDown to affect another

    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?

  2. #2
    eh ya hoser, got a beer? stumon's Avatar
    Join Date
    Feb 2003
    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...

    if (NumericUpDown1.Value > NumericUpDown2.Value)
    	NumericUpDown3.Maximum = NumericUpDown1.Value;
    	NumericUpDown3.Maximum = NumericUpDown2.Value;
    The keyboard is the standard device used to cause computer errors!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. EnableMenuItem has no affect
    By Gerread in forum Windows Programming
    Replies: 3
    Last Post: 04-28-2007, 02:47 AM
  2. Hwang Woo-Suk is a douchebag - how does this affect stem cell research?
    By Govtcheez in forum A Brief History of
    Replies: 9
    Last Post: 01-12-2006, 08:09 AM
  3. will the header file affect the program?
    By Jasonymk in forum C++ Programming
    Replies: 5
    Last Post: 07-16-2003, 07:43 PM
  4. NumericUpDown Control
    By gozlan in forum C# Programming
    Replies: 3
    Last Post: 04-26-2003, 07:15 PM
  5. do pointers affect what they point to directly?
    By PHP in forum C++ Programming
    Replies: 6
    Last Post: 01-14-2003, 01:29 PM