2017-09-23 38 views
0

我想要一个软件具有两个不同的用户界面,以便通过执行该软件将One显示在第一个显示器上,另一个显示在第二个显示器上。这可能吗?我能区分软件中的两台显示器吗? (该程序是用C#和Visual Studio编写的)。一个应用程序的两个不同的接口和监视器

谢谢...

+0

只需打开两个实例到位窗户不同的显示器 – Fabio

+0

两台显示器连接到一台计算机。在两台显示器上打开两个应用程序实例会显示单个图形界面 – fidelroha

回答

1

你可以试试下面的代码示例:

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(); 

了解屏幕CLAS的更多信息:您的应用程序的Click

+0

显示器连接到系统的方式有什么关系? (使用HDMI,VGA ...)。 – fidelroha

+0

@fidelroha不,那应该不重要。 – Odrai

相关问题