I've seen this before too. Windows is designed to detect video card lockups and prompt the video card to stop what it's doing. If the video card doesn't respond, Windows forcefully flushes out the video card's tasks, and resets both the video card and the Windows display driver, resulting in the message you get after a black screen, I'm guessing.
This feature was implemented to allow the system to recover from graphics-related crashes without having to completely reboot.
If you're video card is actually locking up, that's a different problem entirely. However, if windows is just misbehaving, there's a way you can disable this feature in the registry. I forget which keys you have to add or edit, but you could probably look it up.
Keep in mind though that, if you do this, Windows will not automatically recover from video card errors. You'll have to reboot your computer any time your video card freezes. If that's actually what's happening... I don't know what to say. Have you dusted it out recently?