Phosphorylation-induced conformational switching of CPI-17 produces a potent myosin phosphatase inhibitor.