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

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

 更新時間:2013年12月26日 10:41:16   作者:  
利用微軟提供的com組件mstscax.dll實現(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);
            // 獲取主機顯示器屏幕分辨率
            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)文章

最新評論

山东省| 阿勒泰市| 胶南市| 墨竹工卡县| 鹰潭市| 宁德市| 和平县| 葵青区| 永康市| 石家庄市| 缙云县| 瑞安市| 曲沃县| 南汇区| 丹江口市| 天长市| 突泉县| 山阳县| 剑阁县| 桓台县| 西城区| 泌阳县| 舞钢市| 瑞金市| 政和县| 嘉善县| 筠连县| 仙居县| 小金县| 四平市| 青神县| 兴安盟| 渝中区| 贵港市| 平果县| 称多县| 垫江县| 张北县| 邓州市| 准格尔旗| 柳江县|