If you are so inclined and want to save a few dollars or get upgraded parts, look for combos and promo codes. Another shopping hint: sign up for the email from Newegg and watch their sales or look for discounts at SlickDeals.
If you start making substitutions and have questions, post the modified configuration back here to get feedback.
What is the nature of the problem you had with your old computer? If it really is just a virus a clean reinstallation of windows will get rid of it.
If you still want to build a computer, you should still be able to salvage several parts from your old one. DVD-RW, Hard drive, add-in sound and networking cards, power supply and maybe even your case might be perfectly fine if they aren't too old.
With $400 you can get a respectable CPU/Mobo/RAM combo and a graphics card. If you have to stretch your budget to build something from scratch it will be difficult.