Well according to the nvidia specification page (
here) the 5200 only supports DVI resolutions up to 1600x1200. It supports much higher through VGA, which is presumably why you can boot up in that res. I guess because it's not officially supported by the card it's a bit unreliable!
I'd say upgrade your graphics card. Obviously if you're using the 5200 you don't need it for high-power gaming

p), so you should be able to pick up an old second hand card on ebay for a tenner or so, should make your problems go away. Alternatively you could just use the VGA cable instead of DVI, I doubt there's any difference in output quality?