Sub Grid(PanelPaint As Panel)
Dim c As Canvas
c.Initialize(PanelPaint)
c.DrawColor(Colors.White)
Dim Rect1 As Rect
For x = 0dip To 100dip Step 10dip
For y = 0dip To 100dip Step 10dip
Rect1.Initialize(x,y, 10dip, 10dip)
c.DrawRect(Rect1, Colors.Black, False, 1dip)
Next
Next
PanelPaint.Invalidate
End Sub