01.
Private
Sub
Timer1_Tick(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Timer1.Tick
02.
time =
Date
.Now.ToString.Split(
" "
)(1)
03.
Label1.Text$ = time
04.
If
i = 1
And
time.Substring(0, time.Length - 3) = Label2.Text$ &
":"
& Label4.Text$
And
05.
time.Substring(time.Length - 2, 2) =
"00"
Then
06.
Timer1.
Stop
()
07.
My.Computer.Audio.Play(My.Resources.beep, AudioPlayMode.BackgroundLoop)
08.
Me
.WindowState = FormWindowState.Normal
09.
Dim
p
As
New
Point
10.
p.X = (
Me
.Width / 2) - (Label1.Width / 2)
11.
p.Y = Label1.Top
12.
If
Not
Label1.Text$ = vbNullString
Then
13.
Label1.Location = p
14.
End
If
15.
End
If
16.
End
Sub
17.
18.
Private
Sub
Button1_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Button1.Click
19.
Label2.Text = TextBox1.Text
20.
Label4.Text = TextBox2.Text + 1
21.
22.
23.
If
Button1.Text$ =
"ENABLE"
Then
24.
Button1.Text$ =
"DISABLE"
25.
i = 1
26.
Else
27.
My.Computer.Audio.
Stop
()
28.
TextBox1.Clear()
29.
TextBox2.Clear()
30.
Timer1.Start()
31.
i = 0
32.
Button1.Text$ =
"ENABLE"
33.
34.
End
If
35.
If
Label4.Text >= 60
Then
36.
Label2.Text = Label2.Text + 1
37.
Label4.Text = Label4.Text - 60
38.
End
If
39.
40.
End
Sub
41.
42.
Private
Sub
Form1_Load(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
MyBase
.Load
43.
Timer2.Start()
44.
Dim
Str =
"6"
45.
Label4.Text =
Integer
.Parse(Str).ToString(
"00"
)
46.
End
Sub