-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmor_noon_eve_ngt.vb
34 lines (22 loc) · 943 Bytes
/
mor_noon_eve_ngt.vb
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
Public Class mor_noon_eve_ngt
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Hour = Val(TextBox1.Text)
If Hour >= 6 And Hour <= 11.59 Then
MsgBox("Morning", vbCritical, "Result")
ElseIf Hour = 12 Then
MsgBox("Noon", vbCritical, "Result")
ElseIf Hour >= 12.01 And Hour <= 17 Then
MsgBox("Afternoon", vbCritical, "Result")
ElseIf Hour >= 17.01 And Hour <= 20 Then
MsgBox("Evening", vbCritical, "Result")
ElseIf Hour >= 20 And Hour <= 24 Or Hour >= 0 And Hour <= 5.59 Then
MsgBox("Night", vbCritical, "Result")
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.Clear()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
End
End Sub
End Class