I'm having a hard time displaying rectangles from an array. Here's the code:
Dim recs(9) As PowerPacks.RectangleShape
Dim canvas As New Microsoft.VisualBasic.PowerPacks.ShapeContainer
Private Sub Spi_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim sz As Integer = 350
canvas.Parent = Me
recs(0).Height = sz
recs(0).Width = sz
recs(0).Left = 20
recs(0).Top = 20
recs(0).Parent = canvas
recs(0).FillColor = Color.Green
recs(0).FillStyle = PowerPacks.FillStyle.Solid
End Sub
There are no syntax or runtime errors. I can't figure out what is going on. If I try to make a rectangle alone it will show it but when I'm making an array of them, it shows nothing. If I debug it, when the next statement to be executed is any line of code that uses the array, it justs ignores it and moves on, meaning that it will ignore all my commands that use the "recs(0)". Why??? Any help is appreciated. Thanks.
EDIT: Ok guys. Thanks for your help.