Going fullscreen on secondary monitor

前端 未结 7 1672
离开以前
离开以前 2020-11-30 02:31

How can you program a dotNet Windows (or WPF) Application in order to let it going fullscreen on the secondary monitor?

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 03:07

    In WPF: Set the WindowState property in Normal (not Maximixed) and create the event Loaded. In the event write this code:

    this.Left = SystemParameters.PrimaryScreenWidth + 100;
    this.WindowState = System.Windows.WindowState.Maximized;
    

提交回复
热议问题