Have you tried DoEvents after the repaint??