'here's part of the loop creating a label for j = 1 to metricalSyllableCount 'NumberofSyllables ReDim Preserve Onset_Label(j) Onset_Label(j) = New Label() With Onset_Label(j) .AutoSize = False .Text = "Onset" .Height = 25 .Width = 65 '50 .Font = MyFontArialRegular9 .TextAlign = ContentAlignment.MiddleCenter .BackColor = Color.Yellow .Top = MetricalSyllableHolder(j).Top + MetricalSyllableHolder(j).Height + 20 .Left = MetricalSyllableHolder(j).Left - (.Width / 2) .Visible = True .BorderStyle = BorderStyle.Fixed3D TabPage10.Controls.Add(Onset_Label(j)) AddHandler Onset_Label(j).Click, AddressOf DoWorkofOnset_LabelClicked 'DisplayWordRightClicked .Tag = j ToolTip1.SetToolTip(Onset_Label(j), "Onset label of syllable " & .Tag) End With 'other labels and rich boxes done the same way next 'here's the new loop for lines canvas = New ShapeContainer canvas.Parent = TabPage10 'Me For j = 1 To MetricalSyllableCount ReDim Preserve Onset_Line(j) Onset_Line(j) = New Microsoft.VisualBasic.PowerPacks.LineShape() With Onset_Line(j) ' Set the ShapeContainer as the parent of the LineShape. 'theLine.Parent = canvas .Parent = canvas .X1 = MetricalSyllableHolder(j).Left + (MetricalSyllableHolder(j).Width * 0.5) .Y1 = MetricalSyllableHolder(j).Top + MetricalSyllableHolder(j).Height .X2 = Onset_Label(j).Left + (Onset_Label(j).Width * 0.5) .Y2 = Onset_Label(j).Top .BorderColor = Color.Black .BorderWidth = 1 .Visible = True End With 'other lines created next j