The task is to create 1 pixel wide coloured vertical pinstripes with a sufficient number of pinstripes to span the entire width of the graphics display.



The pinstripes should either follow the system palette sequence,   or a sequence that includes:

black,   red,   green,   blue,   magenta,   cyan,   yellow,   and   white:

   after filling the top quarter, switch to a wider 2 pixel wide vertical pinstripe pattern,
   halfway down the display, switch to 3 pixel wide vertical pinstripe,
   finally to a 4 pixels wide vertical pinstripe for the last quarter of the display.


See also

   display black and white 
   print colour


Public Class Main
    Inherits System.Windows.Forms.Form
    Public Sub New()
        Me.FormBorderStyle = FormBorderStyle.None
        Me.WindowState = FormWindowState.Maximized
    End Sub
    Private Sub Main_Load(sender As Object, e As EventArgs) Handles Me.Load
        Dim Index As Integer
        Dim Colors() As Color = {Color.Black, Color.Red, Color.Green, Color.Magenta, Color.Cyan, Color.Yellow, Color.White}
        Dim Height = (Me.ClientSize.Height / 4) + 1
        For y = 1 To 4
            Dim Top = Me.ClientSize.Height / 4 * (y - 1)
            For x = 0 To Me.ClientSize.Width Step y
                If Index = 6 Then Index = 0 Else Index += 1
                Me.Controls.Add(New Panel With {.Top = Top, .Height = Height, .Left = x, .Width = y, .BackColor = Colors(Index)})
            Next
        Next
    End Sub
End Class