2009-06-24 29 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