Assuming you're using XP (as you didn't specify) you'll need to change the visual style you're using for Windows to change these. It's all to do with the way that Windows XP applies its themes. As Microsoft insist that Windows XP themes are digitally signed you're stuck with these ugly borders as I have yet to see a non-Microsoft signed theme. You could try changing the colour scheme but you'll still have inconsistent results. A round of applause for the Microsoft UI Design team? I think not!
There are several programs available that will enable you to skin Windows the way you want (or pretty close to it) such as
WindowBlinds or
StyleXP. I've used them both with varying degrees of success.
A third way (if you're happy having your system files modified) is the
UXTheme patcher which is the method I use as it allows me to apply non-Microsoft themes. Although I
wouldn't recommend this to a novice.
Back once again...