Two computer hosts share one monitor

My philips monitor has two interfaces D-Sub (VGA), DVI-D:

 

Two hosts are connected separately. In addition to using remote tools to control the two hosts,

Sometimes manually press the button below the monitor to set the input source:

I always feel uncomfortable when I manually switch the input source. I checked what software can control it, but it still doesn’t work.

I also tried the philips software SmartControl, but it didn't happen.

Some function buttons cannot be grayed out.

 

When you check the information if there is any programming interface to control the display, you can see that,

An input source interface will automatically switch to another input source if there is no input.

Usually when a computer is turned off, it will automatically switch.

In addition, I thought of the way to use Xiping. Both hosts put the Xiping bat script, just click when you want to switch.

@echo off
echo 1秒钟后自动熄灭屏幕  并   锁屏
 
::1秒延时  (11-1 = 10秒   。127.1是本地地址127.0.0.1的简写。 >nul:将ping到的信息 写入一个空“文件”里    >是重定向符号  nul是空设备的意思  把提示输入到空设备就不显示了 有兴趣的可以去掉这个看看效果)
ping   -n   1   127.1   >nul
 
::息屏
powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)
 

I also know that there are some switching devices on a certain treasure,

But since the display can be switched, there is no need to add another set of equipment.

Unless you plan to use only a set of keyboard and mouse to control two machines

 

Guess you like

Origin blog.csdn.net/yyws2039725/article/details/107641190