Try closing out all those useless Compaq programs running in your system tray. If your advanced enough with computers, download the latest drivers for your machine's components (ie modem, videochip, soundchip, etc.) and format. Then reinstall windows using the latest drivers. This way you avoid all that pre-installed Compaq bloatware from the start .
From my experience with Compaqs, it's a combination of too much useless software running at once combined with cheap hardware that causes those lockups.
Also, when was the last time you ran scandisk/defrag on your system? Windows gets flaky if you go for months at a time without running them.