Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Digital clock for windows appliction

Digital clock for windows appliction

Scheduled Pinned Locked Moved C#
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Ch Gayatri Subudhi
    wrote on last edited by
    #1

    Hi , I need sample link for digital clock for a windows application which is applied and set as per the system timing.If Somebody knows plz help me out.Thanks in advance. Thanks and Regards Ch.Gayatri

    D C A 3 Replies Last reply
    0
    • C Ch Gayatri Subudhi

      Hi , I need sample link for digital clock for a windows application which is applied and set as per the system timing.If Somebody knows plz help me out.Thanks in advance. Thanks and Regards Ch.Gayatri

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      See the text box above? Yes... good. Now, type in the work clock. In the combo box to it's right, select Articles. Then click the Go button. WOW! Always search CP articles before posting questions of this type.

      Dave
      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
      Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

      C 1 Reply Last reply
      0
      • C Ch Gayatri Subudhi

        Hi , I need sample link for digital clock for a windows application which is applied and set as per the system timing.If Somebody knows plz help me out.Thanks in advance. Thanks and Regards Ch.Gayatri

        C Offline
        C Offline
        crrajaguru
        wrote on last edited by
        #3

        hi Ch.Gayatri Subudhi, Try it.. Multipurpose Digital Clock Control using .NET[^]

        R RajaGuru

        1 Reply Last reply
        0
        • C Ch Gayatri Subudhi

          Hi , I need sample link for digital clock for a windows application which is applied and set as per the system timing.If Somebody knows plz help me out.Thanks in advance. Thanks and Regards Ch.Gayatri

          A Offline
          A Offline
          akhilonly007
          wrote on last edited by
          #4

          hey Ch.Gayatri Subudhi just put a timer and label in ur windows form name them as tmrTime and lblTime in form's load event set

          tmrTime.Interval=1000;
          tmrTime.Enabled=true;

          following is timer's tick event and here we update time in label

          public void TmrTimeTick(object sender, EventArgs e)
          {
          lblTime.Text = DateAndTime.Now.ToLongTimeString();
          }

          akhilonly007@gmail.com

          C 1 Reply Last reply
          0
          • D DaveyM69

            See the text box above? Yes... good. Now, type in the work clock. In the combo box to it's right, select Articles. Then click the Go button. WOW! Always search CP articles before posting questions of this type.

            Dave
            BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
            Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

            C Offline
            C Offline
            Ch Gayatri Subudhi
            wrote on last edited by
            #5

            Thanks for your awesome suggestion..... Thanks and Regards Ch.Gayatri

            1 Reply Last reply
            0
            • A akhilonly007

              hey Ch.Gayatri Subudhi just put a timer and label in ur windows form name them as tmrTime and lblTime in form's load event set

              tmrTime.Interval=1000;
              tmrTime.Enabled=true;

              following is timer's tick event and here we update time in label

              public void TmrTimeTick(object sender, EventArgs e)
              {
              lblTime.Text = DateAndTime.Now.ToLongTimeString();
              }

              akhilonly007@gmail.com

              C Offline
              C Offline
              Ch Gayatri Subudhi
              wrote on last edited by
              #6

              Thanks for your concern.My code is working nice now. Inform1.cs: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace clock { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { getTime(); } private void timer1_Tick(object sender, EventArgs e) { textBox1.Text = DateTime.Now.ToString("HH:mm:ss"); } public string getTime() { string TimeInString = ""; int hour = DateTime.Now.Hour; int min = DateTime.Now.Minute; int sec = DateTime.Now.Second; TimeInString = (hour < 10) ? "0" + hour.ToString() : hour.ToString(); TimeInString += ":" + ((min < 10) ? "0" + min.ToString() : min.ToString()); TimeInString += ":" + ((sec < 10) ? "0" + sec.ToString() : sec.ToString()); return TimeInString; } } } and in design of form private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Timer timer1; working fine With Regards Ch.Gayatri

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups