2017-09-23 2 views
0

ソフトウェアを実行することによって、1つ目が最初のモニタに表示され、もう1つが2つ目のモニタに表示されるように、これは可能ですか?ソフトウェア内の2つのモニタを区別することはできますか? (プログラムはC#とVisual Studioで書かれています)。1つのアプリケーション用の2つの異なるインタフェースとモニタ

は、あなたが次のコードサンプルを試みることができる...

+0

ただ、オープン2つのインスタンスを異なるモニター。 – Fabio

+0

2台のモニターがコンピューターに接続されています。両方のモニタで2つのアプリケーションインスタンスを開くと、単一のグラフィカルインターフェイスが表示されます – fidelroha

答えて

1

ありがとう:画面のCLASについて

Form2 form2 = new Form2(); 

// Set this variable to the desired monitor. 
int indexMonitor = 1; 

// Get all the available monitors/ screens 
Screen[] sc = Screen.AllScreens; 

// Use the Bounds.Width and Bounds.Height of the monitor to display form2 on the second monitor. 
form2.Left = sc[indexMonitor].Bounds.Width; 
form2.Top = sc[indexMonitor].Bounds.Height; 

// You modified the .Left and .Top of form2, so you will need to use the FormStartPosition.Manual 
form2.StartPosition = FormStartPosition.Manual; 
form2.Show(); 

詳細情報:上の場所ウィンドウでアプリケーションのClick

+0

モニタがシステムにどのように接続されているかは重要ですか? (HDMI、VGAなど)。 – fidelroha

+0

@fidelrohaいいえ、それは問題ではありません。 – Odrai

関連する問題