Private startTime As Date Private finishTime As Date Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load '現在時刻の 12.34秒後を完了時刻とする startTime = Now() finishTime = startTime.AddSeconds(12.34) Timer1.Interval = 55 Timer1.Start() End Sub Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick Dim currentTime As Date = Now() Label1.Text = String.Format("開始時刻:{0:yyyy/MM/dd HH:mm:ss.ffff}", startTime) Label2.Text = String.Format("現在時刻:{0:yyyy/MM/dd HH:mm:ss.ffff}", currentTime) Label3.Text = String.Format("完了時刻:{0:yyyy/MM/dd HH:mm:ss.ffff}", finishTime) Dim elapsedTime As TimeSpan = currentTime - startTime Dim passedTime As TimeSpan = finishTime - currentTime Label4.Text = String.Format("経過時間:{0}", elapsedTime) Label5.Text = String.Format("残り時間:{0}", passedTime) If currentTime >= finishTime Then Timer1.Stop() End If End Sub