For tri's: keep the body stiff (vertical...no leaning) and don't bend your knees... your legs should be straight. Only bend your knees when you need a spot.
For chest: lean forward as you go down...get a good stretch at the bottom. You can bend your knees or keep the legs straight through out the set of dips. Bending the knees will automatically put the body in a leaning forward position.