Your current events are changing the line position but instantly changing them back because every tick your putting line back to line.X and line.Y+2...
If its either/or like taximan pointed out.. either overlapped or not then his method would work.. otherwise you will need to use a variable that you flip when a collision occurs.. if line normal lineVal=1 upon collision lineVal=0.