Advertisement
Drifting

Untitled

Dec 11th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.24 KB | None | 0 0
  1.  
  2. 'Jack Mcgrath'
  3. '12/12/13'
  4. 'Timetable Program'
  5.  
  6. Public Class Form1
  7.     'What loads when the form opens'
  8.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  9.  
  10.         txta.Visible = False
  11.         txtb.Visible = False
  12.         lbla.Visible = False
  13.         lblb.Visible = False
  14.  
  15.     End Sub
  16.     'What happens when you click button Week A'
  17.     Private Sub btna_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btna.Click
  18.         txta.Visible = True
  19.         lbla.Visible = True
  20.         btnb.Visible = False
  21.     End Sub
  22.     'What happens when you click button Week A'
  23.     Private Sub btnb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnb.Click
  24.         txtb.Visible = True
  25.         lblb.Visible = True
  26.         btna.Visible = False
  27.     End Sub
  28.     'If statement to sort your homework timetable for the inputted day, week A'
  29.     Private Sub txta_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txta.TextChanged
  30.         If txta.Text = ("Monday") Then
  31.             lbla.Text = ("Eng/Chem/ICT")
  32.         ElseIf txta.Text = ("Tuesday") Then
  33.             lbla.Text = ("Math/Geog")
  34.         ElseIf txta.Text = ("Wednesday") Then
  35.             lbla.Text = ("Eng/Bio/His")
  36.         ElseIf txta.Text = ("Thursday") Then
  37.             lbla.Text = ("Math/ICT")
  38.         ElseIf txta.Text = ("Friday") Then
  39.             lbla.Text = ("Phy/Food")
  40.         Else : lbla.Text = ("Invalid/Incomplete Input")
  41.         End If
  42.     End Sub
  43.     'If statement to sort your homework timetable for the inputted day, week B'
  44.     Private Sub txtb_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtb.TextChanged
  45.         If txtb.Text = ("Monday") Then
  46.             lblb.Text = ("Bio/Phy/ICT")
  47.         ElseIf txtb.Text = ("Tuesday") Then
  48.             lblb.Text = ("Eng/Geog")
  49.         ElseIf txtb.Text = ("Wednesday") Then
  50.             lblb.Text = ("Eng/Math/Food")
  51.         ElseIf txtb.Text = ("Thursday") Then
  52.             lblb.Text = ("Chem/His")
  53.         ElseIf txtb.Text = ("Friday") Then
  54.             lblb.Text = ("Math/ICT")
  55.         Else : lblb.Text = ("Invalid/Incomplete Input")
  56.         End If
  57.     End Sub
  58. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement