As John says, if you can hook it up to another computer and the same thing happens, then the monitor itself is bad. This is generally not a cost-effective repair item, unfortunately, so you will want to shop for a new monitor.
If the monitor does not mess up with a different computer, then you have a graphic problem with the primary machine.