I was a COMPAQ service coordinator before the merger with HP.
The problem could be a corrupted video driver or there may be a mechanical reason for your ills.
For the mechanical fix:
There is one or two ribbon cable(s) that connect the LCD screen, near one of the hinges, to the laptop's motherboard.
I have had several Laptops, Compaq, Toshiba, etc, malfunction on my friend’s laptops.
Carefully look around the edge of the screen for small dots that cover the screws holding the face (bezel) onto the cover. Remove the little stickers or plugs and use a small , normally Phillips, screw driver to remove the screws from the screen's bezel.
Now take a thin blade, like a butter knife, and run it along the seam to pop the bezel off the lid, start at the hinge and move around the top of the screen to the other hinge. When that is done you may be 50% finished if it is the screen's cable that is loose otherwise it is onto the case.
Look for the ribbon cable or cables and check the connectors and the power cable at the connector on the screen. Carefully pop them out using the butter knife and plug them back in, carefully.
Power up the laptop and see it this has fixed the issues.
If not it is onto the case.
Maybe you might take it to a service tech if the software driver does not fix the issues, especially if it is under warranty. Otherwise PM me for more instructions.

;f