As Gwylan said a sash clamp is the best way to go.