最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

利用微軟com組件mstscax.dll實(shí)現(xiàn)window7遠(yuǎn)程桌面功能

 更新時(shí)間:2013年12月26日 10:41:16   作者:  
利用微軟提供的com組件mstscax.dll實(shí)現(xiàn)類似window遠(yuǎn)程桌面功能,大家參考使用吧

復(fù)制代碼 代碼如下:

namespace Client
{
    public partial class Login : Form
    {
        private string ip = null;

        public Login()
        {
            InitializeComponent();
        }

        public Login(string IP)
        {
            InitializeComponent();
            ip = IP;
        }

        private void Login_Load(object sender, EventArgs e)
        {
            this.FormClosing += Login_Closing;

            this.Text = string.Format("登錄到:{0}", ip);
            // 獲取主機(jī)顯示器屏幕分辨率
            Rectangle rect = Screen.PrimaryScreen.Bounds;
            try
            {
                rdp.Server = ip;
                rdp.AdvancedSettings2.RDPPort = 3389;
                rdp.Height = rect.Height;
                rdp.Width = rect.Width;
                //rdp.UserName = "client";
                //rdp.AdvancedSettings2.ClearTextPassword = "client";
                rdp.Connect();
                rdp.FullScreen = true;
                //this.FormBorderStyle = FormBorderStyle.None;
                rdp.FullScreenTitle = this.Text;
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void Login_Closing(object sender, FormClosingEventArgs e)
        {
            if (MessageBox.Show("確認(rèn)退出么?", "提示", MessageBoxButtons.YesNo,
                MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No)
                e.Cancel = true;
        }
    }
}

相關(guān)文章

最新評(píng)論

凤凰县| 闽侯县| 儋州市| 长岭县| 禹州市| 扎囊县| 乌恰县| 托里县| 北安市| 汉沽区| 荃湾区| 隆化县| 葫芦岛市| 灵武市| 易门县| 建始县| 苍南县| 朝阳区| 凯里市| 息烽县| 邵东县| 蓬莱市| 舞钢市| 邯郸市| 盐城市| 基隆市| 绩溪县| 灌南县| 民县| 循化| 巴彦县| 广昌县| 尚志市| 呈贡县| 大丰市| 满城县| 威宁| 信丰县| 龙山县| 彭水| 嵊泗县|