Period pain and birth control

How effective is the pill in regulating periods and lowering period pain? I get really painful cramps and a pretty heavy flow sometimes.