Put second display to sleep

Check out DisableMonitor. It is a tool that allows you to change the resolution of a monitor and/or enable and disable it. It works with multiple displays, and it should fix your problem.