Huh? That isn't a very good description of the problem.
When you open a file, change the screen? What do you mean change the screen? Change the resolution? Open what file? Any file?
What computer are you using, and is the computer still useable when these black boxes appear? What can you see/do when this happens? Shut off the machine or keep using it? Gotta paint a better picture for us here.