如何改变显示器3编程 [英] How to change 3rd monitor programatically

查看:331
本文介绍了如何改变显示器3编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我用我的笔记本电脑,我用3显示:

When I'm using my laptop, I use 3 displays:


  1. 笔记本电脑显示器

  2. 接着第二个显示器(VGA通过连接)

  3. 电视机(通过HDMI连接)

我的视频卡不支持3台显示器,所以我不断地从2到3的切换:当我在电脑上,我用的是第二个监视器,当我想观看一些电影,等等。我使用第三。

My videocard doesn't support 3 monitors, so I'm constantly switching from 2 to 3: when I'm on the computer, I use the 2nd monitor, and when I want to watch some movies, etc. I use the 3rd.

我现在必须去的屏幕分辨率的选择显示器,是不是在使用和选择的扩展桌面此显示的。

I currently have to go to Screen Resolution, select the monitor that is not in use, and choose Extend desktop to this display.

有没有一种方法,我可以自动执行它?

是否有任何命令行工具,或任何Windows的API,允许这样做?

Is there any command-line tool, or any Windows API that allows doing it?

编辑:结果
显示切换似乎做什么,我需要,但问题是,它只能检测工作监视器。未检测到第三监视器(这是当前未使用),所以我不能附加。


Display Changer seems to do what I need, but the problem is that it only detects the working monitors. The 3rd monitor (which isn't currently in use) isn't detected, so I can't attach it.

推荐答案

在DisplaySwitch.exe RE的位表明,它调用

A bit of RE on DisplaySwitch.exe shows that it calls

SetDisplayConfig(0, NULL, NULL, NULL, 0x888)

将其设置为扩展我的电脑上。

to set it to Extended on my computer.

从那里,一点点挖周围拉去的 SetDisplayConfig 文档显然也是<一个href=\"http://stackoverflow.com/questions/6590939/how-to-set-display-settings-to-extend-mode-in-windows-7-using-c\">this SO页面一些示例code,查询当前的显示状态,并增加了实际的标志,以改变他们,如果你想这样做。

From there, a little digging around got me to the SetDisplayConfig documentation obviously and also this SO page with some example code that queries your current display state and adds the actual flags to change them if you want to do so.

这篇关于如何改变显示器3编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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