How to launch .NET core Console Window at non-default location

  • Thread starter Thread starter zydjohn
  • Start date Start date
Z

zydjohn

Guest
Hello:

I have multiple .NET Core Console projects, all those console program will launch console window at the default location, which is near the center of the current windows 10 screen. Therefore, I have to click each of them, and drag them to other different position.

For example, when I have 4 of such .net core Console programs, then I want to drag the first one to the upper left corner of the windows 10 screen, then drag the second one to the lower left corner of the current screen, then drag the third one to the upper right corner of the screen, and the last one lower right corner of the screen.

I saw some articles showing how to do similar thing using Windows API, but since I am using .NET core, I don’t want to use Windows API, as it depends on Windows only.

My monitor has resolution of 3840 by 2160 pixels on Windows 10 (version 1903).

I want to divided the screen into 4 parts: upper left, lower left, upper right and lower right, while each part occurs about 20% to 25% of the total screen areas.

Please show me how to use C# to place 4 console program window into each of the 4 parts when they launched.

By the way, my IDE is Visual Studio 2019 version 16.2.4.

Thanks,

Continue reading...
 
Back
Top