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

    How to set time clock runing ?

    hi,

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




    Advance in thanks,

    Balaji
  • #499672
    hai

    you can use timer for this....

  • #499700
    hi bob,

    where i put timer code.which event?


    thanks,
    Balaji

  • #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.