如何创建C#远程桌面应用程序 [英] How to create C# remote desktop application
本文介绍了如何创建C#远程桌面应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试创建一个远程桌面应用。但它显示任何东西。
使用系统;
使用 System.Collections.Generic;
使用 System.ComponentModel;
使用 System.Data;
使用 System.Drawing;
使用 System.Linq;
使用 System.Text;
使用 System.Threading.Tasks;
使用 System.Windows.Forms;
使用 MSTSCLib;
命名空间 RDPTest
{
public partial class Form1:Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click( object sender,EventArgs e)
{
try
{
axMsTscAxNotSafeForScripting1.Server = test123;
axMsTscAxNotSafeForScripting1.UserName = administrator;
IMsTscNonScriptable secured =(IMsTscNonScriptable)axMsTscAxNotSafeForScripting1.GetOcx();
secured.ClearTextPassword = admin @ 123;
axMsTscAxNotSafeForScripting1.Connect();
}
catch (Exception Ex)
{
MessageBox.Show( 连接错误);
}
}
}
}
解决方案
从这里开始:使用C#.NET的远程桌面 [ ^ ]
@Mehdi Gholam This不适用于Windows 8.1。 :(
I try to create a remote desktop app. but it dint show any thing.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MSTSCLib;
namespace RDPTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
axMsTscAxNotSafeForScripting1.Server = "test123";
axMsTscAxNotSafeForScripting1.UserName = "administrator";
IMsTscNonScriptable secured = (IMsTscNonScriptable)axMsTscAxNotSafeForScripting1.GetOcx();
secured.ClearTextPassword = "admin@123";
axMsTscAxNotSafeForScripting1.Connect();
}
catch (Exception Ex)
{
MessageBox.Show("Error Connecting");
}
}
}
}
解决方案
Start here : Remote Desktop using C#.NET[^]
@Mehdi Gholam This is not working on windows 8.1. :(
这篇关于如何创建C#远程桌面应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文