-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm1.vb
More file actions
48 lines (39 loc) · 1.45 KB
/
Form1.vb
File metadata and controls
48 lines (39 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Public Class Form1
Dim currentTime As String
Dim messageTime As String
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
currentTime = TimeOfDay.ToString("hh:mm:ss tt")
Label1.Text = currentTime
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
messageTime = MaskedTextBox1.Text + " " + ComboBox1.Text
Label4.Text = "Reminder set for: " + messageTime
If currentTime = messageTime Then
Timer2.Stop()
MsgBox(TextBox1.Text)
Button1.Enabled = True
Button2.Enabled = False
Label4.Text = ""
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer2.Start()
Button1.Enabled = False
Button2.Enabled = True
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer2.Stop()
Button1.Enabled = True
Button2.Enabled = False
Label4.Text = ""
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
NotifyIcon1.Visible = True
Me.Hide()
NotifyIcon1.ShowBalloonTip(3000)
End Sub
Private Sub NotifyIcon1_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
Me.Show()
NotifyIcon1.Visible = False
End Sub
End Class