24

I am using Visual Studio. I have a solution which contains 2 console application projects. When I pressed run they are appearing on the same screen with Visual Studio. But I need to see console outputs on the other screen which doesn't have Visual Studio.

Cœur
  • 37,241
  • 25
  • 195
  • 267
uzay95
  • 16,052
  • 31
  • 116
  • 182
  • When you run it you see the `Output` pane appears. Drag this pane to the other monitor and Run the program again. – Shiplu Mokaddim Feb 21 '12 at 15:05
  • 1
    You want to use Console.SetWindowPosition(). Look here: http://stackoverflow.com/questions/8911228/setting-c-sharp-console-application-location-to-a-secondary-screen – G_P Feb 21 '12 at 15:06
  • 2
    When the second window created I'm getting this error: `The window position must be set such that the current window size fits within the console's buffer, and the numbers must not be negative. Parameter name: left Actual value was 1749.` – uzay95 Feb 21 '12 at 15:21

1 Answers1

53

Start the solution, click in the top left corner of the console window, Choose Properties , go to the Layout tab, un-check "Let System position window", push ok. Move the window to the other screen where you want it to start up. Close the application gracefully.

Sometimes if it doesn't work the first time I find going back to the layout tab after putting it where you want and then just adjusting the pixel values for the co-ordinates up and down by 1 pixel once makes it "take"

My Other Me
  • 5,007
  • 6
  • 41
  • 48
  • How do you close an app "gracefully", what does that mean? What Windows version was this on? I can't make it work and I am using Windows 10, version 1709. I can set the X and Y coordinates for CMD manually of course, but it has to be within the main monitor. I did try to enter negative numbers to make it go to the other screen. I ended up with CMD starting half way on monitor A and half way on monitor B. – Samir Jan 16 '18 at 17:35
  • 1
    @Samir, "gracefully" means letting the program under test end rather than closing it with the debugger by stopping it. – MikeB Jun 30 '19 at 15:48