So i am trying to make a basic title screen and have made two form2 form 1 has all of the controll to start game go to instuctions (ect) form 2 has a text box that will display some of the working of what is going on in the game and has text inside the text box.

What i am trying to do is after form 1 get through its code ... ( you click a button and it hides form 1 and shows form 2)... i want it to execute form2 code which is a sub prosedure that alligns the text to center in text box1.


This is my code so far:

CODE for form 1:

Public Class Form1

Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Form2.Show()
Me.Hide()
End Sub


End Class


CODE for form 2:

Public Class Form2


Sub alligntext()
RichTextBox1.Text = HorizontalAlignment.Center
End Sub


End Class