Guest User

Untitled

a guest
Jul 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. Public Class Notifications
  2. Dim timeupdate As String
  3. Dim messagetime As String
  4. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  5. x = True
  6. Button2.Enabled = True
  7. If txtMessage.Text = "" Then
  8. MsgBox("please enter a message and title")
  9. Exit Sub
  10. End If
  11. If txtTitle.Text = "" Then
  12. MsgBox("please enter a message and title")
  13. Exit Sub
  14. End If
  15. Dim Time As Boolean = False
  16. Timer1.Start()
  17. Timer2.Start()
  18. Button1.Enabled = False
  19.  
  20.  
  21.  
  22. End Sub
  23.  
  24.  
  25.  
  26. Private Sub timerChecking_Tick(ByVal sender As System.Object, e As EventArgs) Handles timerChecking.Tick
  27. If x = True Then
  28. End If
  29.  
  30. End Sub
  31.  
  32. Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  33. CurrentTime = TimeOfDay.ToString("hh:mm:ss tt")
  34. Label4.Text = CurrentTime
  35. End Sub
  36.  
  37. Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
  38. messagetime = MaskedTextBox1.Text + " " + ComboBox1.Text
  39. If CurrentTime = messagetime Then
  40. Timer2.Stop()
  41. NotifyNewFile.ShowBalloonTip(10000, txtTitle.Text, txtMessage.Text, ToolTipIcon.Info)
  42. Button1.Enabled = True
  43. Button2.Enabled = False
  44. End If
  45.  
  46. End Sub
  47.  
  48. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  49. Timer2.Stop()
  50. Timer1.Stop()
  51. End Sub
  52.  
  53. Private Sub Notifications_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  54. Button2.Enabled = False
  55. End Sub
  56.  
  57. Public CurrentTime As Object
  58. Public X As Boolean = False
Add Comment
Please, Sign In to add comment