The control of the magnetopause by the interplanetary magnetic field