S
Stu
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.FromImage(oBitmap)
Dim oPen As New Pen(Color.Black, 4)
Dim i As Integer
For i = 0 To 10
oGraphic.DrawLine(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.FromImage(oBitmap)
Dim oPen As New Pen(Color.Black, 4)
Dim i As Integer
For i = 0 To 10
oGraphic.DrawLine(oPen, i, 0, i, 150)
Next
Return oBitmap
End Function
Thanks in advance,
Stu