ElliottE4

Untitled

Apr 7th, 2024
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.06 KB | None | 0 0
  1. Public Class Timetable
  2.     Private Sub Timetable_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  3.  
  4.         Dim dte As DateTime = DateTime.Now
  5.         txt_week.Text = FormatDateTime(dte, DateFormat.LongDate)
  6.  
  7.     End Sub
  8.  
  9.     Private Sub pbx_ExitButton_Click(sender As Object, e As EventArgs) Handles pbx_ExitButton.Click
  10.  
  11.         If MsgBox("Are you sure you want to exit to the staff form?", vbYesNo) = vbYes Then 'shows the user a message box that asks if they want to exit to the staff form
  12.  
  13.             'when the exit button is clicked, exit the form if yes is selected
  14.             Dim staff As New Staff 'creates new instance of the staff form
  15.             staff.Show() 'shows the staff form
  16.             Me.Close() 'closes the currrent form
  17.  
  18.  
  19.         End If
  20.  
  21.     End Sub
  22.  
  23.     Private Sub btn_Help_Click(sender As Object, e As EventArgs) Handles btn_Help.Click
  24.  
  25.         Help.txt_help.Text = "This form shows the staff timetable. You can exit back to the staff form using the cross button in the top right."
  26.         Help.Show()
  27.  
  28.     End Sub
  29. End Class
Add Comment
Please, Sign In to add comment