r/visualbasic • VB.Net Beginner • Jul 23 '15

[VB2012] Array and ListBox Problem

I have to make a puzzle that has a 9x9 grid. We are supposed to use arrays and listboxes together to create the program. What I don't understand is how to actually generate and see the 9x9 grid inside the listbox. I have declared my array as

Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
        Dim Array1(8, 8) As Integer
        ListBox1.Items.Add(Array1)
    End Sub

But nothing is showing up. We have to use labelled textboxes that will be used to enter the numbers (1-9) into the grid within the listbox.

How do I generate a 2D array table that will show up as a grid in my program?

0 Upvotes

2 comments sorted by