What software issue could have caused this laptop screen problem?

For a few weeks now, my personal laptop has been acting screwy. Specifically, the screen has been. I was having to keep it at just the right orientation for the image to be visible; moved a fraction of an inch one way or the other and screen would go blank. I assumed it had a short. Since I hate this Compaq with the heat of a thousand novas and was planning to buy a new one anyway, I shrugged it off; I could use it, and though the problem was likely to get worse, who cared?

Anyway, I found myself unable to boot up at all. System restore wasn’t doing anything useful, so after a while I gritted my teeth and reformatted the whole thing. The gritting of the teeth came only because of the waste of time; I had done a backup Sunday backups and hadn’t created or modified any documents on that computer since Saturday, and I had the restore CDs and all my program CDs with proper documentation, so it was just a matter of letting her rip while I was at work and occasionally taking out one disc and putting in another.

So all that’s done. To my surprise, doing so has cured the vanishing screen image problem. I just moved the screen through its entire range of motion, and nothing happened.

So what was the issue here?

I don’t think it was malware. I have AVG and Ad-aware running on that computer and do regular updates and system scans, and had done a complete scan using both just the day before. The problem with the screen had never responded to the weekly checkups, which is part of why I thought it was a hardware issue.

Thoughts, anyone?