2 Star 3 Fork 0

[email protected]/RdpClient

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
frmRdpClient.cs 2.11 KB
一键复制 编辑 原始数据 按行查看 历史
[email protected] 提交于 2021-03-20 13:08 . 初始化项目
using RDPCOMAPILib;
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 AxRDPCOMAPILib;
using AxMSTSCLib;
using RdpClient.Library;
namespace RdpClient
{
public partial class frmRdpClient : Form
{
public frmRdpClient()
{
InitializeComponent();
}
private void RdpSessionOnOnAttendeeConnected(object pAttendee)
{
IRDPSRAPIAttendee att = pAttendee as IRDPSRAPIAttendee;
LogClass.Instance.Debug(att.RemoteName);
att.ControlLevel = CTRL_LEVEL.CTRL_LEVEL_VIEW;//这个一定要有
}
public void Connection(string Server, string UserName, string Password, int Port = 3389)
{
axMsRdpClient9.DesktopWidth = SystemInformation.WorkingArea.Width;
axMsRdpClient9.DesktopHeight = SystemInformation.WorkingArea.Height - 30;
axMsRdpClient9.FullScreen = false;
axMsRdpClient9.Server = Server;
axMsRdpClient9.AdvancedSettings9.RDPPort = Port;
axMsRdpClient9.UserName = UserName;
if (!string.IsNullOrEmpty(Password))
{
axMsRdpClient9.AdvancedSettings9.ClearTextPassword = Password;
}
axMsRdpClient9.AdvancedSettings9.ConnectToAdministerServer = true;
axMsRdpClient9.AdvancedSettings9.ConnectToServerConsole = true;
axMsRdpClient9.AdvancedSettings9.RedirectClipboard = true;
axMsRdpClient9.AdvancedSettings9.EnableCredSspSupport = true;
axMsRdpClient9.ColorDepth = 16;
axMsRdpClient9.OnFatalError += AxMsRdpClient9_OnFatalError;
axMsRdpClient9.Connect();
}
private void AxMsRdpClient9_OnFatalError(object sender, IMsTscAxEvents_OnFatalErrorEvent e)
{
LogClass.Instance.Debug("errorCode=" + e.errorCode);
}
private void frmRdpClient_Load(object sender, EventArgs e)
{
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/mylikekefu/RdpClient.git
[email protected]:mylikekefu/RdpClient.git
mylikekefu
RdpClient
RdpClient
master

搜索帮助