I assume that you've done the obvious things, like making sure that the VGA connector hasn't come slightly loose. That apart, I would say that it's most likely to be a monitor defect. It might be the sort of defect which responds to a hammer, but even so, when CRT monitors start to get intermittent they never really improve.