How do I force the debugged app to open in a secondary monitor with Visual Studio 2010
When I debug an application in VS20开发者_如何学Python10 I want it to open in my secondary monitor, but it always opens in the primary monitor. How do I force it to open in the secondary monitor?
I have read elsewhere on SO that I need to move the app to the secondary window and close it (not shift-F5) and it will open there the next time. This doesn't work.
Set the second monitor as the primary display.
The application will be launched in this display.
The only drawback is that this setting is global and will change, by default, the taskbar position, powerpoint presentation, etc.
There is actually another solution: put some code in the application, that only runs when debugging, to move the window to the second monitor when it launches.
Credit to Steve B in the comments for this. Set the secondary monitor to be your primary monitor (via display properties/settings) does the trick. The app now launches in the "other" monitor
For VS2017, simply do this: 1. select your Visual Studio main window 2. hover mouse over the monitor where you want the app to run 3. Press to run
App starts wherever mouse was hovering.
精彩评论