3

In my application i am utilizing the Remote Desktop ActiveX control

How do i maximize the RDP session? I would like it to be full screen once connected.

PriceCheaperton
  • 5,071
  • 17
  • 52
  • 94

1 Answers1

1

I'm not sure from your question if you're using this via the web or WinForms app but if it's from a WinForms application you can do the following.

First you need to subscribe to the OnConnected event

  // Subscribe to the OnConnected Event in the constructor or via the form designer.
  this.axMsRdpClient91.OnConnected += new System.EventHandler(this.axMsRdpClient91_OnConnected);


private void btnFullscreen_Click( object sender, EventArgs e )
{
  if ( axMsRdpClient91.Connected == 0 )
  {

    axMsRdpClient91.UserName = "Username";
    axMsRdpClient91.Server = "address to server to connect to";
    // Connect to the server
    axMsRdpClient91.Connect();
  }

}
// When the the ActiveXControl raises the OnConnected event set the screen to full screen mode.
private void axMsRdpClient91_OnConnected( object sender, EventArgs e )
{
  ( (AxMSTSCLib.AxMsRdpClient9)sender ).FullScreen = true;
}