RoyalApps.Community.FreeRdp.WinForms embeds FreeRDP's Windows client in a WinForms application. It launches wfreerdp.exe with a parent-window handle; it does not use Microsoft RDP ActiveX or FreeRdpKit.
- Typed destination, gateway, display, certificate, and redirection settings.
- A bundled client, with support for selecting a compatible custom executable.
- Connection events, credential/certificate retries, and resize/zoom reconnects.
- Opt-in native diagnostics with per-launch configuration and stdout/stderr capture, introduced in 2.2.4.
The current source targets .NET 10 on Windows. Older package releases may have different framework requirements.
The documentation can be found here:
- Documentation site
- Getting Started
- Configuration
- Lifecycle and Events
- Diagnostics
- Troubleshooting
- Support Matrix
- API Reference
See documentation development and deployment to preview the site locally or publish it to GitHub Pages.
dotnet add package RoyalApps.Community.FreeRdp.WinFormsFor the diagnostics APIs, install version 2.2.4 or later from a feed containing that version.
On the WinForms UI thread, add the control to a form or container before connecting:
using System.Windows.Forms;
using RoyalApps.Community.FreeRdp.WinForms;
// In your form's constructor, after initialization:
var rdp = new FreeRdpControl { Dock = DockStyle.Fill };
Controls.Add(rdp);
rdp.Configuration.Server = "desktop.example.test";
// Obtain credentials through your host application's secure credential flow.
rdp.Configuration.Username = username;
rdp.Configuration.Password = password;
Shown += (_, _) => rdp.Connect();Use rdp.Disconnect() to stop the client. The containing form owns and disposes the control. Keep certificate validation enabled; see the guide before implementing certificate exceptions.
Set DiagnosticsOptionsProvider before connecting and subscribe to DiagnosticOutput. The provider is evaluated before every native launch, including internal retries.
Output is raw and potentially sensitive. Handlers must be thread-safe and nonblocking. The host owns redaction, bounded buffering, file writing, persistence, and enable/disable policy. See the diagnostics guide for an integration example and lifecycle details.
Open src/RoyalApps.Community.FreeRdp.slnx and run RoyalApps.Community.FreeRdp.WinForms.Demo.
dotnet build src/RoyalApps.Community.FreeRdp.slnx -c Release
dotnet test src/RoyalApps.Community.FreeRdp.WinForms.Tests/RoyalApps.Community.FreeRdp.WinForms.Tests.csproj -c Release
npm ci
npm run docs:devMIT License. FreeRDP and other bundled dependencies retain their respective licenses.
Special thanks to Marc-André Moreau and akallabeth for their help.
