2009-06-24 25 views

回答

1

未测试:(没有在目前的双屏幕设定,以测试)

bool onPrimary = this.Bounds.IntersectsWith(Screen.PrimaryScreen.Bounds); 

其中“这”的主要表现形式的应用。

编辑:刚刚测试过它,它按预期工作。

4

您可以使用Screen类来告诉您某个控件是否在特定的屏幕上。您也可以获得主要监视,并且每个屏幕对象也都有一个主要属性,指示它是否是主要监视。

这是msdn article

您应该能够使用它像这样:

var monitor = Screen.FromControl(this); 

if (monitor.Primary) //the monitor returned is the primary monitor