Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8285109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:22:15+00:00 2026-06-08T11:22:15+00:00

I have Timer3 tick event inside i set the timer3 interval to the numericupdown

  • 0

I have Timer3 tick event inside i set the timer3 interval to the numericupdown value:

private void timer3_Tick(object sender, EventArgs e)
        {
            try
            {
                Image iOLd = this.pictureBox1.Image;
                Image img = Image.FromFile(_files[_indx].FullName);
                trackBar1.Value = _indx;
                label23.Text = _files[_indx].Name;
                this.pictureBox1.Image = img;

                if (iOLd != null)
                    iOLd.Dispose();
                _indx++;

                if (_indx >= _files.Count)
                {
                    _indx = 0;
                    trackBar1.Value = 0;
                }
                timer3.Interval = Convert.ToInt32(numericUpDown1.Value); 
            }
            catch
            {

            }
        }

I also did it in the numericupdown valuechanged event:

private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            timer3.Interval = Convert.ToInt32(numericUpDown1.Value);
        }

The problem is for example i set the numericupdown value while the program is running to 10000 and its moving very slow then i set at once the value to 1 so instead the timer3 interval to take effect once i changed it to 1 its waiting for another cycle of the 10000 value then the timer3 interval is acting as value 1.

What i want to do is when i change the numericupdown from 10000 to 1 it will change rightaway and not wait for another round of the 10000 value.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T11:22:22+00:00Added an answer on June 8, 2026 at 11:22 am

    Supposing you are using a Windows.Forms.Timer then you need to stop the Timer before changing the interval then restart it.

    timer3.Stop();
    timer3.Interval = Convert.ToInt32(numericUpDown1.Value); 
    timer3.Start();
    

    From MSDN

    Calling Start after you have disabled a Timer by calling Stop will cause the Timer to restart the interrupted interval. If your Timer is set for a 5000-millisecond interval, and you call Stop at around 3000 milliseconds, calling Start will cause the Timer to wait 5000 milliseconds before raising the Tick event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: private void timer1_Tick(object sender, EventArgs e) { #region BaseAddress Process[]
I have this code: private void timer_Tick(object sender, EventArgs e) { timer.Stop(); for (int
I have some code where the timer EventHandler has this void timer_Tick(object sender, EventArgs
I have an event inside my program in which there are values of tantheta
Ok, i have a closing event on my form. The code inside it fades
I have a timer with 10 seconds interval and on timer_Tick event I do
If I have an event that starts a timer with an interval of say,
I have a timer tick that I would like to kick off my backgroundworker
I have a timer that needs to not process its elapsed event handler at
I have a C# windows forms application. The way I currently have it set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.