具有两个视频输出的应用程序 [英] An application with two video output

查看:63
本文介绍了具有两个视频输出的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我需要开发一个处理我的PC视频的两个出口的应用程序.这个想法是,启动应用程序后,主体表单将在系统的主体视频出口处执行,并将另一种形式发送到辅助视频出口.

谢谢!!

hi guys,
I need to develop an application that handles both exits of video of my PC. The idea is that on having initiated the application the principal form executes in the exit of principal video of the system and that send another form to the secondary video exit.

thanks!!

推荐答案

你好,

您可以使用Screen类来做到这一点.

确保您的主体表单在第一个屏幕上打开:
Hello,

you can do this by using the Screen class.

To make sure your principal form opens on the first screen:
static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    var form1 = new Form1();
    form1.StartPosition = FormStartPosition.Manual;
    form1.Location = Screen.PrimaryScreen.Bounds.Location;
    Application.Run(form1);
}



要在辅助屏幕(或大于2的其他任何屏幕)上打开第二个表单,请执行以下操作:



To open your second form on the secondary screen (or any other if more than 2):

int screenToUse = 1;
Screen[] screens = Screen.AllScreens;
var form2 = new Form2();
form2.Location = screens[screenToUse].WorkingArea.Location;
form2.Show();



瓦莱丽.



Valery.


谢谢,瓦莱丽!确实对我有帮助.
Thanks, Valery! It helped me really.


这篇关于具有两个视频输出的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆