What if you load the file in the constructor and not in the paint event?