简体   繁体   English

如何以“跨度”模式连接到远程桌面

[英]How to connect to a remote desktop in 'span' mode

I am looking for some documentation or some code example to connect to a remote desktop using C# MSTSCLib and AxMSTSCLib while displaying the created window in 'span' mode when using multiple screens. 我正在寻找一些文档或代码示例,以使用C#MSTSCLib和AxMSTSCLib连接到远程桌面,同时在使用多个屏幕时以“跨度”模式显示创建的窗口。 I would like to get the equivalent of the command: 我想得到等效的命令:

mstsc /span remote_ip mstsc / span remote_ip

I only found this link Where can I find documentation on the C# MSTSCLib, specifically the MsRdpClient classes? 我仅找到此链接在哪里可以找到有关C#MSTSCLib的文档,特别是MsRdpClient类? but it did not help me much. 但这并没有太大帮助。 I am already able to connect to a remote desktop by calling 我已经可以通过调用连接到远程桌面

connect() connect()

on a 在一个

AxMsRdpClient2 AxMsRdpClient2

object. 宾语。 There are a lot of settings that can be modified to tune the behaviour or this object (authentication, etc) but I cannot find how to display the result in a window that fills multiple screens instead of only one screen. 有许多设置可以修改以调整行为或此对象(身份验证等),但是我找不到如何在填充多个屏幕而不是一个屏幕的窗口中显示结果的方法。

I managed to do what I wanted. 我设法做到了自己想要的。 The only trick is to set the following properties: 唯一的技巧是设置以下属性:

_axMsRdpClient.DesktopWidth = ClientRectangle.Width; _axMsRdpClient.DesktopWidth = ClientRectangle.Width;

_axMsRdpClient.DesktopHeight = ClientRectangle.Height; _axMsRdpClient.DesktopHeight = ClientRectangle.Height;

_axMsRdpClient.AdvancedSettings3.SmartSizing = true; _axMsRdpClient.AdvancedSettings3.SmartSizing = true;

before calling 打电话之前

connect() connect()

Once this method is called I do not think it is possible to change the size of the remote desktop. 调用此方法后,我认为无法更改远程桌面的大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM