I am creating a windows application in C#. I have a form, added rdp control and trying to show VM in the form. I am using AxMSTSCLib.AxMsTscAxNotSafeForScripting
to programmatically open a remote VM.
The call to connect()
executes without any error but VM is not showing up. Am I missing anything? Below is the code:
AxMSTSCLib.AxMsTscAxNotSafeForScripting rdpClient;
rdpClient.Server = "IP address";
rdpClient.UserName = @"builtin\Username";
MSTSCLib.IMsTscNonScriptable secured = MSTSCLib.IMsTscNonScriptable)rdpClient.GetOcx();
secured.ClearTextPassword = "Password";
rdpClient.Visible = true;
rdpClient.Connect();
rdpClient.Show();
I expect to see the remote VM in the windows form.