Isn't "D" a string array? If so, then just add the array without trying to specify the elements:
vb.net Code:
Me.MainGrid.Rows.Add(D)
Edit: Just now noticed you initialized with 20 elements. Are they all needed?
Edit...Again: Where are you initializing the ReceivedLine variable that is used here:
vb.net Code:
BackgroundWorker1.ReportProgress(1, ReceivedLine)
I only see it declared in your ProgressChanged event, which is outside the scope of the DoWork event.




Reply With Quote