Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am very new to programming and I am using Visual Studio 2013. I have created a

ID: 3790805 • Letter: I

Question

I am very new to programming and I am using Visual Studio 2013. I have created a form timer but I need to know how to add code for a module for the form timer. It would be great if it could include a Function, Subroutine, and one of the following: If Then, Select Case, For Next, Do While, or Do Loop Until. Not looking for anything fancy just something basic that includes the above. I have included an image of what I have so far.

Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Start()
End Sub

Public Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
TextBox1.Text = Val(TextBox1.Text) + 1
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Application.Restart()
End Sub

Private Sub ClockToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ClockToolStripMenuItem.Click
ClockOutput.Text = TimeString
ClockOutput.Text = Format(Now, "hh:mm:ss tt")
End Sub

Private Sub DateToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateToolStripMenuItem.Click
DateOutput.Text = DateString
Dim today As Date = Date.Today
DateOutput.Text = DateTime.Now.ToLongDateString()
End Sub

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
  
End Sub

Private Sub DateOutput_Click(sender As Object, e As EventArgs) Handles DateOutput.Click

End Sub

Explanation / Answer

Public Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
TextBox1.Text = Val(TextBox1.Text) + 1
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Application.Restart()
End Sub

Private Sub ClockToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ClockToolStripMenuItem.Click
ClockOutput.Text = TimeString
ClockOutput.Text = Format(Now, "hh:mm:ss tt")
End Sub

Private Sub DateToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateToolStripMenuItem.Click
DateOutput.Text = DateString
Dim today As Date = Date.Today
DateOutput.Text = DateTime.Now.ToLongDateString()
End Sub

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote