Solved it (I think).
Moving the entire code to the OnPaint() seemed to do the trick.

Thanks again