rosshodges Posted December 13, 2002 Posted December 13, 2002 I have the following code Private Sub NumericUpDown2_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumericUpDown2.ValueChanged If NumericUpDown2.Value > 59 Then NumericUpDown1.Value = +1 NumericUpDown2.Value = 0 End If but it only makes NumericUpDown1 go up to 1 from 0 not from 1 to 2. I would like it to go like a timing device. So from 1 to 2 to 3 etc. NumericUpDown2.Value = secs NumericUpDown1.Value = minutes Regards, Ross Quote "Drink wet cement and get really stoned"
*Experts* Bucky Posted December 13, 2002 *Experts* Posted December 13, 2002 If I understand correctly, you want to set the minimum value for NUD1 to 1. To do this, set its Minimum property to 1. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Moderators Robby Posted December 13, 2002 Moderators Posted December 13, 2002 I can't see a good reason to do this, but if you really want you can use a timer. I would use a label for this. Quote Visit...Bassic Software
rosshodges Posted December 13, 2002 Author Posted December 13, 2002 sorry to confuse you , its a countdown timer program. and the NumericUpDown boxs are the minutes seconds and hours . when the seconds get to 59 i want the minutes go to 1. i can do this with the code above but it only works from 59 secs to one min. not from 1min 59 until two and 2min 59 can anyone help i tried putting in (+1) instead of +1 but it gives and an error. Regards, Ross Quote "Drink wet cement and get really stoned"
*Experts* Bucky Posted December 13, 2002 *Experts* Posted December 13, 2002 Ah, I see your problem. In this line... NumericUpDown1.Value = +1 ... you are setting the value to positive one. This is different than using the addition assignment operator, which is +=, like so: NumericUpDown1.Value += 1 Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
rosshodges Posted December 13, 2002 Author Posted December 13, 2002 thanks that works! regards, ross Quote "Drink wet cement and get really stoned"
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.