But you set The "draw" to False wich means if you maximize or minimize the window it is not going to redraw. Take that line away.
vb Code:
  1. Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
  2.         If Me.Draw Then
  3.             CreatePlanets(100, 100, 200, 200, 300, 300, 0, 0, 0, 0, -0.2, 0.2, 0.3, -0.2, 0, 0, 0, 0, 0, 0, 100000000000, 100000000000, 1000000000, 0, 0, 10, 20, 30, 0, 0)
  4.             Me.Draw = False '<= Take away this line!!!
  5.         End If
  6.     End Sub