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 8581307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:00:59+00:00 2026-06-11T21:00:59+00:00

OK, so on form load i call a method that starts a timer, which

  • 0

OK, so on form load i call a method that starts a timer, which every tick is suppose to increment an integer value and set a text box field text = to the integer.ToString and for some reason it increment by 4 instead of 1……….

 /// <summary>
    /// Starts the Timer >:D
    /// </summary>
    public void StartCounting()
    {
        t.Interval = 1000;
        t.Tick += new System.EventHandler(OnTimerEvent);
        t.Start();


    }

    /// <summary>
    /// This is what Happens when the timer ticks.
    /// </summary>
    /// <param name="source"></param>
    /// <param name="e"></param>
    public void OnTimerEvent(object source, EventArgs e)
    {

        textBoxActual.Text = currentMinute.ToString();
        currentMinute = currentMinute + 1 ;
    }

na

the number in green is textBoxActual <.<

This is my form load code:

  private void Form1_Load(object sender, EventArgs e)
    {


        Order o = new Order();
        StartedOrders = o.GetUnfinishedOrders();
        PopulateGrid(StartedOrders, dataGridViewStartedOrders);

        //Set the top row to be some abstract style.
        System.Windows.Forms.DataGridViewCellStyle iStyle = new DataGridViewCellStyle();
        iStyle.BackColor = Color.Green;
        System.Drawing.Font f = new System.Drawing.Font("Times New Roman",13,FontStyle.Bold);
        iStyle.Font = f;
        dataGridViewStartedOrders.Rows[0].DefaultCellStyle = iStyle;
        dataGridViewStartedOrders.ClearSelection();


        try
        {
            textBoxOrderNumber.Text = "O# " + dataGridViewStartedOrders.Rows[0].Cells[1].Value.ToString();
            textBoxCustomerName.Text = dataGridViewStartedOrders.Rows[0].Cells[2].Value.ToString();
            textBoxTarget.Text = dataGridViewStartedOrders.Rows[0].Cells[5].Value.ToString();
            textBoxActual.Text = "0";
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }

        StartCounting();
    }
  • 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-11T21:01:00+00:00Added an answer on June 11, 2026 at 9:01 pm

    If it is always updating by 4, my psychic debugging powers say that you’re adding your listener 4 times.

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

Sidebar

Related Questions

In my load event on a form, I call some method in a try
Hi I want to set opacity for a form in page load. I try
I'm here because I can't load a piece oh html code (a form that
I have a child form that is throwing an ApplicationException in the Load event
I have the following method in my ApplicationController so that I can load unique
I want to run a console application (eg app.exe) from a windows form load
This code works anywhere else.. form load, button click, etc. But when I add
I load a form and dynamically populate a select via AJAX from a PHP
I want to load the form fields using json data. I am using extjs
We are using jquery to .load() a form into a div We then use

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.