Quite slow to update with this but I got VB to draw a 10x10 grid though I may end up going down a different route with this
Private Sub FrmMain_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
'Declare local variables
Dim Graphicals As Graphics
Dim Rectangles As Rectangle
Dim PenColour As New Pen(Color.Red)
Graphicals = Me.CreateGraphics
For a As Integer = 1 To 9
For b As Integer = 1 To 9
Rectangles = New Rectangle(b * 52, a * 52, 50, 50)
Graphicals.DrawRectangle(Pens.Black, Rectangles)
Graphicals.FillRectangle(Brushes.ForestGreen, Rectangles)
Rectangles = Nothing
Next
Next
Graphicals.Dispose()
Graphicals = Nothing
End Sub
No comments:
Post a Comment