Wpf start in primary screen

前端 未结 5 1271
臣服心动
臣服心动 2020-12-21 00:43

If user has multiple screens,

how can I start application in primary screen or chosen screen at start up

5条回答
  •  执笔经年
    2020-12-21 01:37

    See this MSDN question: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/316c001b-0511-4c18-8e26-d46021381ae6

    You can find information about the primary screen in SystemParameters.PrimaryScreen* Then you can use Window.WindowStartupLocation or for a specific point you can use the W32 APIs and use SetWindowPos to position your screen on start up.

提交回复
热议问题