I have been having a strange problem with my computer, when surfing the web or I have a number of folders open on my desktop my monitor will flash black and all the open folders will now be closed. If I am playing a game I have never experienced this problem. I notice most when I have a lot of open folders.

How do I fix this?