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