vb传c#for循环!
我是从c#转换的程序,为什么在vb中不能循环,我该怎么传?
Dim i As Single
For i = PictureBox1.Height To 0
Dim pointfbegin As PointF = New PointF(0, i = i - 20.0F)
Dim pointend As PointF = New PointF(PictureBox1.Height, i = i - 20.0F)
backgroundimage.DrawLine(Pens.Yellow, pointfbegin, pointend)
Next i
'绘制背景纵轴线
For i = PictureBox1.Width To 0
Dim pointfbegin As PointF = New PointF()
Dim pointfend As PointF = New PointF()
If (i - 1.0F > = 0) Then
pointfbegin = New PointF(i - 1.0F, 0.0F)
pointfend = New PointF(i - 1.0F, PictureBox1.Height)
backgroundimage.DrawLine(Pens.Yellow, pointfbegin, pointfend)
End If
Next i
[解决办法]
For i = PictureBox1.Width To 0 step -1
[解决办法]
step -1