title: How to make something visible in a form by checking a variable?
body: <p>i'm making a childrens maths program and what I have in mind is setting a global variable and once a child has gone through and learnt what is on each form I would set a variable such as teacher = true. After this is set and the child returns back to the mainpage a hidden section will become visible i'm not sure how to make that section visible and i'm not sure if it's because i'm not using the right way of doing this or not declaring the global variables correctly</p>
  
  <p>Currently for the global variables i just put</p>
  
  <pre><code>Public Teacher As Boolean 
  </code></pre>
  
  <p>At the top of my mainpage </p>
  
  <p>I don't know where I should put on the mainpage for when it opens up to do a check of the variable to see whether or not it is true or false and then to execute the code that I want it to execute. </p>
  
  <p>This is what i currently have </p>
  
  <pre><code>Private Sub Mainpage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      If Teacher = True Then
          aboutpage.Visible = True
      Else
          aboutpage.Visible = False
      End If
  End Sub
  </code></pre>
  
  <p>That's for the loading of the mainpage but it doesn't show the about page if teacher is = true </p>
  
  <p>Here is what i had for changing teacher to true or false</p>
  
  <pre><code>Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
      Me.Close()
      Enabled11.Show()
      Mainpage.Show()
      Teacher = True
  End Sub
  
  Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
      Me.Close()
      Teacher = False
      Mainpage.Show()
  End Sub
  </code></pre>
  
  <p>I have a feeling it's the variable but i'm not sure what I did wrong is there anyone here who has contact details for instant messaging who could help me with this? </p>