23-11-17, 12:51 PM
PHP كود :
Dim i As Integer = 0
Dim i2 As Integer = 0
Dim distance As Integer = 15
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim g As Graphics
g = PictureBox1.CreateGraphics
Dim blackpen As New Drawing.Pen(Color.Gray)
While i <= PictureBox1.Height
g.DrawLine(blackpen, 0, i, PictureBox1.Width, i)
i += distance
End While
While i2 <= PictureBox1.Width
g.DrawLine(blackpen, i2, 0, i2, PictureBox1.Height)
i2 += distance
End While
End Sub
