You must Sign In to post a response.
  • Category: Windows

    How to set time clock runing ?


    how to set the current time running with seconds. how to set this?

    Advance in thanks,

  • #499672

    you can use timer for this....

  • #499700
    hi bob,

    where i put timer code.which event?


  • #499754
    Add Timer and Label into you form,then enable timer,

    in timer tick event.

    private void timer1_Tick(object sender, EventArgs e)
    label1.Text = DateTime.Now.ToLongTimeString();


  • #499780
    use a timer set the timer interval as 100 and in the tick event of the timer change the value like

    private void timer1_Tick(object sender, EventArgs e)
    Label1.Text = DateTime.Now.ToShortTimeString();

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.