Public Sub New(ByVal path As String) accept a string variable
MyBase.New()
InitializeComponent()
Dim reader As New IO.Streamreader(path)
TextBox1 = reader.ReadToEnd 'read to something, like a textbox
End Sub
Dim path As string 'a variable that will keep the path
Public Sub New(ByVal quizpath as string)
MyBase.New()
InitializeComponent()
path = quizpath
End Sub
Dim reader As New IO.StreamReader(path) 'get the path of the quiz
Dim x as Integer = 0 'keep track of how many checkboxes there is
Do While reader.Read()
checkboxes(x) = New CheckBox
checkboxes(x).Caption = reader.ReadLine() 'read the line
checkboxes(x).Location = New Point(coordinates)
Me.Controls.Add(checkboxes(x))
x +=1
Loop