using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AxMSTSCLib;
namespace sysFunDevelopment
{
public partial class Form1 : Form
{
public AxMSTSCLib.AxMsRdpClient rdpClient;
public Form1()
{
InitializeComponent();
}
private void btnRemote_Click(object sender, EventArgs e)
{
rdpClient = new AxMSTSCLib.AxMsRdpClient();
rdpClient.Dock = DockStyle.Fill;
rdpClient.Width = Screen.PrimaryScreen.Bounds.Width;//控件宽度
rdpClient.Height = Screen.PrimaryScreen.Bounds.Height;//控件宽度
this.Controls.Add(rdpClient);
rdpClient.Server = "61.172.255.112";//服务器地址
rdpClient.UserName = "lin";//this.StrName;
rdpClient.AdvancedSettings2.RDPPort = 10008; //3389;
rdpClient.AdvancedSettings2.ClearTextPassword = "lin()";//this.StrPwd;//密码
rdpClient.ColorDepth = 16;//颜色位数
rdpClient.FullScreen = true;//是否全屏
rdpClient.Connect();
}
}
}