I'm trying to host the ActiveX RDP control in WPF. Using the code below the RDP session connects when the connect button is pressed and you can see the screen. You can hover the mouse over the remote desktop objects and see their tooltips but you can't click on anything?
While debugging I did experience one session where I could click and it acted as expected but I was unable to reproduce this behavior.
Thanks
Craig.
<
Window x:Class="Nstrument.Portal.Controls.Rdp"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Rdp" Height="900" Width="910">
<StackPanel Name="panel">
<Button Name="connect"></Button>
</StackPanel>
</
Window>
public partial class Rdp : Window {
AxMSTSCLib.
AxMsRdpClient2 _rdp;
public Rdp() {
InitializeComponent();
_rdp = new AxMSTSCLib.AxMsRdpClient2();
WindowsFormsHost formsHost = new WindowsFormsHost();
formsHost.Width = 900;
formsHost.Height = 700;
formsHost.Child = _rdp;
this.panel.Children.Add(formsHost);
this.connect.Click += new RoutedEventHandler(connect_Click);
}
void connect_Click(object sender, RoutedEventArgs e) {
_rdp.Domain = "domain";
_rdp.UserName = "username";
_rdp.AdvancedSettings2.ClearTextPassword = "pwd";
_rdp.Server = "192.168.1.100";
_rdp.Connect();
}
}