VB6: Embedding the RDP Client Control

Setting it Up

This is incredibly easy to do.

  1. Begin a new EXE project.
  2. Add the Microsoft Terminal Services Control as a component.
  3. Add the following code to a form.
Private Sub Form_Load()
  MsRdpClient21.DesktopHeight = 600
  MsRdpClient21.DesktopWidth = 800
  Form1.Height = (MsRdpClient21.DesktopHeight + 30) * Screen.TwipsPerPixelY
  Form1.Width = MsRdpClient21.DesktopWidth * Screen.TwipsPerPixelX
  MsRdpClient21.Height = MsRdpClient21.DesktopHeight * Screen.TwipsPerPixelY
  MsRdpClient21.Width = MsRdpClient21.DesktopWidth * Screen.TwipsPerPixelX
  MsRdpClient21.Server = "SERVERNAME"
  MsRdpClient21.Connect
End Sub
  1. Compile.
  2. Run.

Any questions?