I want to display date and time on top of the form where normlly written form1 forms name
i want to display date in formate of for example 23 August 2010
and time in this formate 12:33:20AM
Please please help.
I want to display date and time on top of the form where normlly written form1 forms name
i want to display date in formate of for example 23 August 2010
and time in this formate 12:33:20AM
Please please help.
Me.Text = Date.Now.ToLongDateString & " - " & TimeOfDay
where should i write this line of code to get date and time on top of the form?
Thanks its woking but now it replaces form name how can i display both the form name and date and time.
Please please help thanks for your kind support and help.
How is it adding the date and time to your Form's Title? Me.Text=""?
Have you tried adding the name of your Form's title first, followed by & and the code I have provided?
Sorry i didn't understand you please provide me example
Public Class Form1
Private WithEvents myTimer As New Timer With {.Interval = 1000, .Enabled = True}
Private Sub myTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles myTimer.Tick
Me.Text = "Cool little Title - " & Date.Now.ToLongDateString & " - " & TimeOfDay
End Sub
End Class
see 1st take Timer from toolbox & then write blow mention code & date format u can change as per your requirement ok if u still have any doubt u can ask me ok
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Text = "title wich you want write here " & Now.ToUniversalTime
End Sub
End Class
I want to display date and time on top of the form where normlly written form1 forms name
i want to display date in formate of for example 23 August 2010
and time in this formate 12:33:20AM
Please please help.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.