You should just re-draw everything in the Paint event, basically. Why would you even want to draw anything outside of the Paint event?

P.S. @.paul.
1. CInt(Math.Floor(x)) is the same as CInt(x).
2. You should probably use the Random object instead.
3. You should dispose the Graphics object
4. You should give a type to x, y, w, and h.
But I guess it's just an example anyways.