AxMSTSCLib PerformanceFlags设置不起作用

时间:2017-11-12 10:31:24

标签: c# performance rdp

我试图在我的程序中显示标准Windows RDP客户端的元素。 一切都运行良好,但我无法设置性能设置(禁用图像,主题等),因为任何值都会忽略此选项。 以下是可能值的说明: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();
        }
    }
}

使用:

    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");
    }

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

您应该首先设置属性: NetworkConnectionType 。什么样的价值没关系。

enter link description here

相关问题