-
Feb 13th, 2014, 07:57 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] C# auto timer
How to make timer to change his Interval from Combobox.items to read what minute is selected?
-
Feb 13th, 2014, 08:57 AM
#2
Thread Starter
Fanatic Member
Re: C# auto timer
i try with button click to start it
this.timer1.Interval = (int)numericUpDown1.Value;
timer1.Start();
but it doesnt read info from numericUpDown what i type in value
-
Feb 13th, 2014, 08:59 AM
#3
Re: C# auto timer
The Timer doesn't change its Interval. YOU change it's Interval. If you want to set the Interval from a ComboBox selection then get the selection from the ComboBox and assign it to the Interval of the Timer. It's just as obvious as it sounds. Just keep in mind that Timer.Interval is measured in milliseconds, so if you have a number of minutes then you must multiply by 60,000.
-
Feb 13th, 2014, 09:03 AM
#4
Re: C# auto timer
Originally Posted by diablo21
i try with button click to start it
this.timer1.Interval = (int)numericUpDown1.Value;
timer1.Start();
but it doesnt read info from numericUpDown what i type in value
You're going to have to explain what you mean by that. The Timer isn't reading anything. Your code is getting the Value from the NumericUpDown. It's getting it alright. Have you looked at the value of the Interval property after that code? Is it what you expect? If not, what is it and what did you expect it to be? If it is then it is, so what's the actual problem?
-
Feb 13th, 2014, 09:08 AM
#5
Thread Starter
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|