Problem solve Get help with specific problems with your technologies, process and projects.

Need Timer control to enable after clicking check button

I'm using the Timer control and need it to be enabled after I click the check button. Then I need it to erase the data in two of my labels to allow for entry of more data.
Public Class Form1
    Inherits System.Windows.Forms.Form

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = True Then
            Label1.Text = "Timer Enabled"
            Label2.Text = "Timer Enabled"
            Timer1.Enabled = True
            Label1.Text = "Disabled Timer"
            Label2.Text = "Disabled Timer"
            Timer1.Enabled = False
        End If
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
        Label2.Text = Date.Now()
    End Sub
End Class

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.