Sub RenderPanel2(grad As Int)
Dim dRect As Rect
can2.DrawColor(Colors.Transparent)
For i=0 To NUMBALLS
dRect.Initialize(ball(i).x - BALL_RADIUS, ball(i).y - BALL_RADIUS,ball(i).x + BALL_RADIUS, ball(i).y + BALL_RADIUS)
bmpBallClosed = bmpBallClosed.Rotate(grad)
can2.DrawBitmap(bmpBallClosed, Null, dRect)
Next
pan2.Invalidate
End Sub