用C# 實做 遠端桌面連線 , 因為公司ERP 使用遠端方式連接 , 做個小程式方便公司使用,
順便學習一下C# 的開發環璄
AxMSTSCLib.AxMsRdpClient6 rdpc = new AxMSTSCLib.AxMsRdpClient6
rdpc.Server = "IP ADDR" //遠端ip
rdpc.UserName = "LOGIN ID" //登入帳號
IMsTscNonScriptable secured = (IMsTscNonScriptable)rdpc.GetOcx();
secured.ClearTextPassword = "LOGIN PASSWORD"; //登入密碼
rdpc.DesktopHeight = Screen.PrimaryScreen.Bounds.Height; //取得本機解析度
rdpc.DesktopWidth = Screen.PrimaryScreen.Bounds.Width; //並設定遠端主機解析度
rdpc.AdvancedSettings6.RedirectPrinters = true; //使用本機印表機
rdpc.AdvancedSettings6.RedirectClipboard = true; //使用本機剪貼簿
rdpc.FullScreen = true; //全螢幕
rdpc.ColorDepth = 16; //彩度
this.Controls.Add(rdpc);
rdpc.Connect();
rdpc.FullScreenTitle = "TITLE"; //顯示抬頭
jason0324 發表在 痞客邦 留言(0) 人氣()