can someone help me with this issue i don't see why its not initializing but here is my error:
Object reference not set to an instance of an object.
And Here is My Code:
Dim pic As New PictureBox
Dim frm As New Form
Public lbllist As Generic.List(Of Label)
Public piclist As New Generic.List(Of PictureBox)
Public txtbox As Generic.List(Of TextBox)
Private index As Integer
Sub AddLabel(ByVal label_index As Long, ByVal caption As String, ByVal left As Integer, ByVal top As Integer, ByVal customsize As Integer, ByVal customcolor As Integer, ByVal alignment As Byte, ByVal width As Long, ByVal height As Long)
Dim lblboxer As New Label
lblboxer.Text = caption
lblboxer.Left = left
lblboxer.Top = top
lblboxer.Font = New Font(lblboxer.Font.FontFamily, customsize)
lblboxer.ForeColor = Color.Yellow
lblboxer.TextAlign = ContentAlignment.MiddleCenter
lblboxer.Width = width
lblboxer.Height = height
lbllist.Add(lblboxer)
frm.Controls.Add(lbllist.Item(label_index))
AddHandler lbllist.Item(label_index).Click, AddressOf label_Click
End Sub
and this is what is not initializing for some strange reason in that code(above):
piclist.Add(Picboxer)
Thanks in return,
Stormshell