You will want to scuff up the bars so the paint sticks better. Use an abrasive sand paper or a wire wheel on a drill.
Then you apply paint, let it dry, reapply, let it dry, clear coat, let it dry. It should be no less than 24 hours before you touch them again.
For your cranks - forget about it. Your feet constantly rub against the cranks and will wear through spray paint really, really quick. You can try, but I would expect the paint to rub off within a week.