Hi,
Why does the code below only draw the last line of the loop? I was expecting
this to draw 10 parallel lines. More to the piont....how do I get it to draw
10 parallel lines?
Public Function GetImage() As Bitmap
Dim oBitmap As Bitmap = New Bitmap(200, 200)
Dim oGraphic As Graphics = Graphics.FromIm age(oBitmap)
Dim oPen As New Pen(Color.Black , 4)
Dim i As Integer
For i = 0 To 10
oGraphic.DrawLi ne(oPen, i, 0, i, 150)
Next
Return oBitmap
End Function
Thanks in advance,
Stu
Why does the code below only draw the last line of the loop? I was expecting
this to draw 10 parallel lines. More to the piont....how do I get it to draw
10 parallel lines?
Public Function GetImage() As Bitmap
Dim oBitmap As Bitmap = New Bitmap(200, 200)
Dim oGraphic As Graphics = Graphics.FromIm age(oBitmap)
Dim oPen As New Pen(Color.Black , 4)
Dim i As Integer
For i = 0 To 10
oGraphic.DrawLi ne(oPen, i, 0, i, 150)
Next
Return oBitmap
End Function
Thanks in advance,
Stu
Comment