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. Visual Basic
  4. Coding for a digital clock

Coding for a digital clock

Scheduled Pinned Locked Moved Visual Basic
designjsonhelptutorialquestion
5 Posts 3 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
    cubbeardc
    wrote on last edited by
    #1

    I need help in coding a timer control digital clock. Anyone have any suggestions on how to start? In the form, do I add the text box in design , then switch to code and code the rest? What code should I use? I read somewhere where I could use System.datetime.now which returns the current datetime. HELP! Thanks Michael

    R C 2 Replies Last reply
    0
    • C cubbeardc

      I need help in coding a timer control digital clock. Anyone have any suggestions on how to start? In the form, do I add the text box in design , then switch to code and code the rest? What code should I use? I read somewhere where I could use System.datetime.now which returns the current datetime. HELP! Thanks Michael

      R Offline
      R Offline
      Rizwan Bashir
      wrote on last edited by
      #2

      1. Place timer on your form which will have 1 second time to execute again. 2. Use System.DateTime.now.ToString("hh:mm:ss") 'in Timer Event this will give time in required format 3. Now its on you how to display .. like place labels,Place Images or place what ever you want.

      Rizwan Bashir ALM Soft[^]

      C 1 Reply Last reply
      0
      • R Rizwan Bashir

        1. Place timer on your form which will have 1 second time to execute again. 2. Use System.DateTime.now.ToString("hh:mm:ss") 'in Timer Event this will give time in required format 3. Now its on you how to display .. like place labels,Place Images or place what ever you want.

        Rizwan Bashir ALM Soft[^]

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

        Many Thanks Rizwan Michael

        1 Reply Last reply
        0
        • C cubbeardc

          I need help in coding a timer control digital clock. Anyone have any suggestions on how to start? In the form, do I add the text box in design , then switch to code and code the rest? What code should I use? I read somewhere where I could use System.datetime.now which returns the current datetime. HELP! Thanks Michael

          C Offline
          C Offline
          cubbeardc
          wrote on last edited by
          #4

          OK, I am still having some problems with this. I am a beginner and for some reason it's not registering in my head. So what you are saying is in the Private Sub area, I add the System.datetime.now and where is the time event located? Many thanks Michael

          R 1 Reply Last reply
          0
          • C cubbeardc

            OK, I am still having some problems with this. I am a beginner and for some reason it's not registering in my head. So what you are saying is in the Private Sub area, I add the System.datetime.now and where is the time event located? Many thanks Michael

            R Offline
            R Offline
            robertw019
            wrote on last edited by
            #5

            Goto the forms designer and double click on the timer control. This should take you to the Code window. Look for "Private Sub Timer1_Tick", put your system.DateTime code in there

            H|D News, My RSS feed reader

            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