AxMSTSCLib PerformanceFlags setting don't work

1

I'm trying to display an element of the standard Windows RDP client in my program. Everything works well, but I cant set the performance setting (disable images, themes, etc), since this option is ignored, for any values. Here is a description of possible values: https://msdn.microsoft.com/en-us/library/aa381215(v=vs.85).aspx

namespace RDPClient
{
    class RdpConnector : AxMsRdpClient7NotSafeForScripting
    {
        public  void Connect(string ip, string user, string pass)
        {
            Server = ip;
            UserName = user;
            (GetOcx() as IMsTscNonScriptable).ClearTextPassword = pass;
            AdvancedSettings6.RDPPort = 3389;
            AdvancedSettings7.EnableCredSspSupport = true;
            AdvancedSettings7.PerformanceFlags |= 0x00000002; // for example, disable fullwindowdrag
            Connect();
        }
    }
}

Using:

    RdpConnector RDPConn;
    private void Form1_Load(object sender, EventArgs e)
    {
        RDPConn = new RdpConnector();
        RDPConn.Size = new Size(1024, 768);
        RDPConn.Dock = DockStyle.Fill;

        ClientSize = new Size(1280, 768);
        Controls.Add(RDPConn);

        RDPConn.Connect("1.2.3.4", "user", "pass");
    }

Any ideas?

c#
performance
rdp
asked on Stack Overflow Nov 12, 2017 by Inav Petrov

1 Answer

0

you should set the property first:NetworkConnectionType. And What kind of value does not matter.

enter link description here

answered on Stack Overflow Sep 5, 2019 by Gavin

User contributions licensed under CC BY-SA 3.0