Public Sub Main() NewMand End sub Public Sub NewMand() MinX = -2 MaxX = 1.25 MinY = -1.25 MaxY = 1.25 dx = (MaxX - MinY) / picOut.ScaleWidth dy = (MaxY - MinY) / picOut.ScaleHeight For n = 1 To picOut.ScaleWidth For m = 1 To picOut.ScaleHeight SetPixelV picOut.hdc, n, m, RenderJul(MinX + n * dx, MinY + m * dy) * 2560 Next Next End Sub Public Function RenderJul(ByVal cA As Double, ByVal cBi As Double) As Long Static A, Bi, Len_Z As Double A = 0 Bi = 0 Iter = 0 Len_Z = 0 DoEvents Do Until (Len_Z >= 4) Or (Iter >= 30) Or CanIt = True OLD_A = A A = A * OLD_A - Bi * Bi + cA Bi = 2 * A * Bi + cBi Len_Z = A * A + Bi * Bi Iter = Iter + 1 Loop RenderJul = Iter End Function