VB6 about step size!

The key is:

Dim i As Integer

You declared that i is an integer, so the number added at one time is less, less than 1, and still 0 , the loop is still like this again, always i=0. So the loop will not end.

However, the step size is too large and the curve is really unsightly.

what to do?

The solution is to change i to a floating point number!

dim i as single

Try it this time. As long as the step size is above 0.000001, there will always be no problem!