I'm kind of a beginner at customizing a computer. but I feel that my current radeon hd5450 that came with it is just to weak.
as said I want to upgrade to a radeon hd6850. but I'm not sure if it will fit in my case. my pc-model is a HP Pavilion P6340nl
An HP 300w-rated power supply unit won't support the HD6850 anyway at much load, what do you plan to do with your computer and what's the budget for the upgrade? Screen resolution is an important factor too in choosing a new video card.
im using a screen with a 1920x1080 resolution at the moment at which I play my games. And gaming is my main purpose for this computer. and since the card itself is about €130,- I was planning on maxing my upgrade on max €200,- total.
you are right that a 5450 is nearly useless for gaming. unfortunately your power supply limits your upgrade to maybe a 6670, which while far superior to your 5450, will still seriously limit the potential of your machine. you will unfortunately also need to replace your power supply to get a powerful gaming rig.