Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim x As Integer
Dim y As Integer
Dim blackPen As New Pen(Color.Black, 3)
Dim g As Graphics

g = PictureBox1.CreateGraphics

For r As Double = 0 To 400
y = cdbl(textbox1.text)
x = r

g.DrawLine(blackPen, CType(x, Single), CType(y, Single), CType(x, Single) + 1, CType(y, Single))

Next r
End Sub


i got an error says invalid conversion from string to double
how to do ?