Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Add a System.Windows.Forms.Timer to your form, in design view, called Timer1. Add a Label to your form called Label1. Set the Timer Interval to 1000 (milliseconds) and Enabled to True. Double-click the Timer to create a handler for the default event, which is Tick. In the event handler put this line of code:
Me.Label1.Text = Date.Now.ToLongTimeString()

The Date type also supports ToShortTimeString and ToString with format information.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...