1.11M Members

Displaying time on a Form

 
0
 

Hey all~ I'm very new to VB.net infact i've only been so far through 2 classes but I'm still going. My personal Project that I'm doing is a simply display with some buttons that when you click on them that link to an exe file on my desktop. I've gotten that part down, but i'm having trouble locating code to add/Display time on my form.. I want it to display Vertical with the format of HH:MM:SS | MM/DD/YYYY. I want it to be in sync with my system time. Is there any way possibal of doing that? ^^; Thanks in advance for any help.:mrgreen:

 
0
 

Have you tried the date() class?

 
0
 

You need to add a Timer to you form and a Lable

Double click in the timer and it should up the code editor in the Timer Tick event.

In the Tick event you need to update the Lable.

Lable.text = Date.Now or there abouts..

Make sure the timer interval is set to 1 second, (timer is in milli seconds to it will be 1000)

Stick to it and all this will make sense soon.

JAPEL

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article