Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
time = Date.Now.ToString.Split(" ")(1)
Label1.Text$ = time
If i = 1 And time.Substring(0, time.Length - 3) = Label2.Text$ & ":" & Label4.Text$ And
time.Substring(time.Length - 2, 2) = "00" Then
Timer1.Stop()
My.Computer.Audio.Play(My.Resources.beep, AudioPlayMode.BackgroundLoop)
Me.WindowState = FormWindowState.Normal
Dim p As New Point
p.X = (Me.Width / 2) - (Label1.Width / 2)
p.Y = Label1.Top
If Not Label1.Text$ = vbNullString Then
Label1.Location = p
End If
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label2.Text = TextBox1.Text
Label4.Text = TextBox2.Text + 1
If Button1.Text$ = "ENABLE" Then
Button1.Text$ = "DISABLE"
i = 1
Else
My.Computer.Audio.Stop()
TextBox1.Clear()
TextBox2.Clear()
Timer1.Start()
i = 0
Button1.Text$ = "ENABLE"
End If
If Label4.Text >= 60 Then
Label2.Text = Label2.Text + 1
Label4.Text = Label4.Text - 60
End If
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim a, b As Integer
a = 2
b = 5
Label1.Text = (a + b).ToString("00")
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
time = Date.Now.ToString.Split(" ")(1)
Label1.Text$ = time
If i = 1 And time.Substring(0, time.Length - 3) = Label2.Text$ & ":" & Label4.Text$ And
time.Substring(time.Length - 2, 2) = "00" Then
Timer1.Stop()
My.Computer.Audio.Play(My.Resources.beep, AudioPlayMode.BackgroundLoop)
Me.WindowState = FormWindowState.Normal
Dim p As New Point
p.X = (Me.Width / 2) - (Label1.Width / 2)
p.Y = Label1.Top
If Not Label1.Text$ = vbNullString Then
Label1.Location = p
End If
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label2.Text = TextBox1.Text
Label4.Text = TextBox2.Text + 1
If Button1.Text$ = "ENABLE" Then
Button1.Text$ = "DISABLE"
i = 1
Else
My.Computer.Audio.Stop()
TextBox1.Clear()
TextBox2.Clear()
Timer1.Start()
i = 0
Button1.Text$ = "ENABLE"
End If
If Label4.Text >= 60 Then
Label2.Text = Label2.Text + 1
Label4.Text = Label4.Text - 60
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer2.Start()
Dim Str = "6"
Label4.Text = Integer.Parse(Str).ToString("00")
End Sub