手机
当前位置:查字典教程网 >编程开发 >C#教程 >利用微软com组件mstscax.dll实现window7远程桌面功能
利用微软com组件mstscax.dll实现window7远程桌面功能
摘要:复制代码代码如下:namespaceClient{publicpartialclassLogin:Form{privatestringip=...

复制代码 代码如下:

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("确认退出么?", "提示", MessageBoxButtons.YesNo,

MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No)

e.Cancel = true;

}

}

}

【利用微软com组件mstscax.dll实现window7远程桌面功能】相关文章:

解析C#中用Process类杀死进程,执行命令的深入分析

深入反射生成数组的详解

C#中使用IrisSkin2.dll美化WinForm程序界面的方法

PowerShell 定时执行.Net(C#)程序的方法

C#保存图片到数据库并读取显示图片的方法

将ocx文件转换成C#程序引用的DLL文件的办法

c#用Treeview实现FolderBrowerDialog 和动态获取系统图标(运用了Win32 dll类库)

c#调用存储过程实现登录界面详解

c# 类型转换

C#利用com操作excel释放进程的解决方法

精品推荐
分类导航