Skip to content

RdpControl

A WinForms control that hosts an embedded RDP session or launches an external RDP client process.

Type

csharp
RoyalApps.Community.Rdp.WinForms.RdpControl

Properties

CurrentZoomLevel (int)

Gets the current zoom level in percent of the remote desktop session.

ExternalProcessId (int?)

Gets the external process ID while RdpControl.RdpConfiguration uses RdpSessionMode.External and the process is still running.

ExternalSessionWindowHandle (nint?)

Gets the last known top-level external session window handle while RdpControl.RdpConfiguration uses RdpSessionMode.External.

Logger (ILogger)

Gets or sets the logger used by the control.

RdpClient (IRdpClient?)

Access to the embedded RDP client and its events, methods, and properties. Returns null while RdpControl.RdpConfiguration uses RdpSessionMode.External.

RdpConfiguration (RdpClientConfiguration)

Gets or sets the configuration used to create and connect the RDP session.

SessionCapture (Bitmap?)

Gets the last captured screenshot of the session, when session capture is enabled.

WasSuccessfullyConnected (bool)

Gets a value indicating whether the session has connected successfully at least once.

Events

BeforeRemoteDesktopSizeChanged

Handler Type: EventHandler<CancelEventArgs>?

Raised before the remote desktop size changes. Set System.ComponentModel.CancelEventArgs.Cancel to cancel the resize operation.

ExternalSessionWindowChanged

Handler Type: EventHandler<ExternalWindowChangedEventArgs>?

Raised when the tracked top-level window for an external session is discovered, changes, or disappears.

OnClientAreaClicked

Handler Type: EventHandler?

Raised when the user clicks inside the remote desktop session and click detection is enabled.

OnConfirmClose

Handler Type: EventHandler<IMsTscAxEvents_OnConfirmCloseEvent>?

Raised when the client calls the RequestClose method.

OnConnected

Handler Type: EventHandler<ConnectedEventArgs>?

Raised when the session has started.

OnDisconnected

Handler Type: EventHandler<DisconnectedEventArgs>?

Raised when the session has been disconnected or the external client process exits.

OnRequestContainerMinimize

Handler Type: EventHandler?

Raised when the user presses the Minimize button on the connection bar in full-screen mode. This is a request for the container application to minimize itself.

OnRequestLeaveFullScreen

Handler Type: EventHandler?

Raised when the client requests to leave full-screen mode or ContainerHandledFullScreen has been set to a nonzero value.

RdpClientConfigured

Handler Type: EventHandler?

Raised after the IRdpClient has been created and configured, but before the connection is established. This allows additional customization that is not covered by RdpControl.RdpConfiguration.

RemoteDesktopSizeChanged

Handler Type: EventHandler?

Raised when the remote desktop size has changed.

Back to API index

MIT Licensed