You could send the array in the parent form to the child form
Parent form
Code:
Private Questions(10) As String
. . .
Private Sub Button1_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
. . .
Dim f As New frmChildForm(Questions)
Try
f.ShowDialog()
Finally
f.Dispose()
End Try
Child form
Code:
Public Class frmChildForm
Private Questions() As String
Public Sub New(ByVal sender() As String)
InitializeComponent()
Questions = sender
End Sub
Private Sub Form2_Load( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.DataSource = Questions
End Sub
End Class
Or MainForm
Code:
Public Class frmMainForm
Private mQuestions(10) As String
Public ReadOnly Property Questions() As String()
Get
Return mQuestions
End Get
End Property
. . .
Dim f As New frmChildForm
Try
f.ShowDialog()
Finally
f.Dispose()
End Try
Child form
Code:
Public Class frmChildForm
Private Sub Form2_Load( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.DataSource = frmMainForm.Questions
End Sub
End Class
To add a single item
Code:
ListBox1.Items.Add(frmMainForm.Questions(0))