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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:23:44+00:00 2026-06-17T23:23:44+00:00

I want to add functionality to my WinForms so that when it starts a

  • 0

I want to add functionality to my WinForms so that when it starts a counter starts which will be in hh:mm. I know this can be done using a timer. I have made a time label which displays the current time, but I don’t know how to start the timer when the form is loaded. Is there any method or class for that?

  • 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-17T23:23:45+00:00Added an answer on June 17, 2026 at 11:23 pm

    Place Timer component to your form (drag it from ToolBox – it’s imporant, because timer should be registered as form’s component to be disposed correctly when form closes). Set timer’s Interval property to 60000 (that’s equal to one minute). And subscribe to Tick event:

    void timer1_Tick(object sender, EventArgs e)
    {
        if (endTime < DateTime.Now)
        {
           MessageBox.Show("Time is out!");
           timer1.Stop();
           return;
        }
    
        timeLabel.Text = (endTime - DateTime.Now).ToString(@"hh\:mm");
    }
    

    On Form_Load event handler start timer and save countdown end time:

    private DateTime endTime; // field to store end time
    
    void Form1_Load(object sender, EventArgs e)
    {
        endTime = DateTime.Now.AddMinutes(120); // set countdown to 120 minutes
        timer1.Start();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We alert user using this javascript, now i want to add this functionality to
I want to add functionality for the zoom in/out image that display by the
I want to add more functionality to a project I have that makes use
I want to add a dashboard functionality to an existing java web application, this
I want to add functionality to javascript-mode so that, whenever I save a Javascript
In an app that i'm creating, I want to add functionality that groups news
I have a Windows desktop application that I want to add some functionality to.
I am working on magento. I want add a functionality that when user places
I am creating pagination using Codeigniter, and I want to add ajax functionality. JS
My code creates dynamically a table using jquery. I want to add delete functionality

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.