Dim Line1 As PointF
Dim Line2 As PointF
Dim ColSize As Single
Dim RowSize As Single
Dim nRows As Integer
Dim nCols As Integer
Dim penBlack As New Drawing.Pen(System.Drawing.Color.Black, 1)
nRows = 9
nCols = 18
RowSize = Me.PictureBox1.Height / nRows
ColSize = Me.PictureBox1.Width / nCols
Draw Vertical grid
Line1.X = ColSize
Line1.Y = 0
Line2.X = ColSize
Line2.Y = Me.PictureBox1.Height
For X = 0 To nCols
e.Graphics.DrawLine(penBlack, Line1, Line2)
Line1.X = Line1.X + ColSize
Line2.X = Line2.X + ColSize
Next X
Draw Horizontal grid
Line1.X = 0
Line1.Y = RowSize
Line2.X = Me.PictureBox1.Width
Line2.Y = RowSize
For X = 0 To nRows
e.Graphics.DrawLine(penBlack, Line1, Line2)
Line1.Y = Line1.Y + RowSize
Line2.Y = Line2.Y + RowSize
Next X