0

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. I would like to get the equivalent of the command:

mstsc /span remote_ip

I only found this link Where can I find documentation on the C# MSTSCLib, specifically the MsRdpClient classes? but it did not help me much. I am already able to connect to a remote desktop by calling

connect()

on a

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.

Community
  • 1
  • 1
  • This may not apply to you, but something keep in mind that only Windows 7 Ultimate allows for true multi-monitor RDP support. Professional wasn't enough for me to use my two monitors to RDP into my dual monitor work machine with proper dual monitor support. – JoelC Dec 17 '14 at 21:17
  • I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackexchange.com/questions/19190/)", where the consensus is "no, they should not". – John Saunders Dec 18 '14 at 21:22

1 Answers1

0

I managed to do what I wanted. The only trick is to set the following properties:

_axMsRdpClient.DesktopWidth = ClientRectangle.Width;

_axMsRdpClient.DesktopHeight = ClientRectangle.Height;

_axMsRdpClient.AdvancedSettings3.SmartSizing = true;

before calling

connect()

Once this method is called I do not think it is possible to change the size of the remote desktop.

Community
  • 1
  • 1