Specifying startup window/form location on multiple displays

前端 未结 3 514
孤独总比滥情好
孤独总比滥情好 2021-01-20 22:18

I have two displays (two monitors) connected to my machine, and I noticed a strange thing happening today. I had an Explorer window open with my compiled exe on my primary d

3条回答
  •  后悔当初
    2021-01-20 22:47

    Screen[] myScreen = Screen.AllScreens;
    this.Location = myScreen[0].WorkingArea.Location; // Primary Screen
    this.Location = myScreen[1].WorkingArea.Location; // Secondary Screen
    

提交回复
热议问题