2014-05-18 30 views

回答

0

我不确定您的问题是否通过网络或WinForms应用程序使用此功能,但是如果它来自WinForms应用程序,则可以执行以下操作。

首先,你需要订阅OnConnected事件

// Subscribe to the OnConnected Event in the constructor or via the form designer. 
    this.axMsRdpClient91.OnConnected += new System.EventHandler(this.axMsRdpClient91_OnConnected); 


private void btnFullscreen_Click(object sender, EventArgs e) 
{ 
    if (axMsRdpClient91.Connected == 0) 
    { 

    axMsRdpClient91.UserName = "Username"; 
    axMsRdpClient91.Server = "address to server to connect to"; 
    // Connect to the server 
    axMsRdpClient91.Connect(); 
    } 

} 
// When the the ActiveXControl raises the OnConnected event set the screen to full screen mode. 
private void axMsRdpClient91_OnConnected(object sender, EventArgs e) 
{ 
    ((AxMSTSCLib.AxMsRdpClient9)sender).FullScreen = true; 
} 
+0

其网页形式...谢谢 – PriceCheaperton