Did the OP call EndPaint()?