如何使用RDP从Windows 7连接到Windows 10?

如何使用RDP从Windows 7连接到Windows 10?

问题描述:

尊敬的先生/女士,



你好吗?



我可以使用RDP功能从Windows 7连接到Widows 7。我可以从Windows 10连接到Windows 7.但是如果我无法从Windows 7连接到Windows 10怎么办?



请告诉我如何从基于Windows 7的RDP程序访问Windows 10 RDP远程客户端。

Dear Sir/Madam,

How are you doing?

I can connect from Windows 7 to Widows 7 using the RDP function. And I can connect from Windows 10 to Windows 7. But what if I can not connect from Windows 7 to Windows 10?

Please let me know How can I connect from Windows 7 based RDP program to access windows 10 RDP remote client.

谢谢。

命名空间PCRDP

{

   公共部分类别PCRDP:表格

    {

       公共PCRDP()

        {

            InitializeComponent();

        }


        private void button1_Click(object sender,EventArgs e)

        {

           试试
            {

                rdpClient.Server = txtServer.Text;

                rdpClient.UserName = txtUserName.Text;

                //rdpClient.Domain =" domain.com&quot ;;

                IMsTscNonScriptable secured =(IMsTscNonScriptable)rdpClient.GetOcx();

                secured.ClearTextPassword = txtPassword.Text;

                //rdpClient.FullScreenTitle =" Full Screen"; $
                //rdpClient.SecuredSettings.FullScreen = 1;

                //rdpClient.SecuredSettings.StartProgram = @" c:\windows \ System32 \ calc.exe&quot ;;

                rdpClient.Connect();

            }¥b $ b            catch(例外情况)

            {

                MessageBox.Show("连接错误","错误连接到远程桌面"+"txtServer.Text +"错误: " + Ex.Message,MessageBoxButtons.OK,MessageBoxIcon.Error);

            }¥b $ b        }


        private void button2_Click(object sender,EventArgs e)

        {

           试试
            {

                //在断开连接之前检查是否已连接

                if(rdpClient.Connected.ToString()==" 1")

                    rdpClient.Disconnect();

            }¥b $ b            catch(例外情况)

            {

                MessageBox.Show(" Error Disconnecting"," Error disconnect from remote desktop" + txtServer.Text +" Error: " + Ex.Message,MessageBoxButtons.OK,MessageBoxIcon.Error);

            }¥b $ b        }¥b $ b    }
}  

namespace PCRDP
{
    public partial class PCRDP : Form
    {
        public PCRDP()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                rdpClient.Server = txtServer.Text;
                rdpClient.UserName = txtUserName.Text;
                //rdpClient.Domain = "domain.com";
                IMsTscNonScriptable secured = (IMsTscNonScriptable)rdpClient.GetOcx();
                secured.ClearTextPassword = txtPassword.Text;
                //rdpClient.FullScreenTitle = "Full Screen";
                //rdpClient.SecuredSettings.FullScreen = 1;
                //rdpClient.SecuredSettings.StartProgram = @"c:\windows\System32\calc.exe";
                rdpClient.Connect();
            }
            catch (Exception Ex)
            {
                MessageBox.Show("Error Connecting", "Error connecting to remote desktop " + txtServer.Text + " Error:  " + Ex.Message,MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                // Check if connected before disconnecting
                if (rdpClient.Connected.ToString() == "1")
                    rdpClient.Disconnect();
            }
            catch (Exception Ex)
            {
                MessageBox.Show("Error Disconnecting", "Error disconnecting from remote desktop " + txtServer.Text + " Error:  " + Ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    }
}   

硬件和软件开发工程师

Hi Hyeon-Cheol Park2,

Hi Hyeon-Cheol Park2,

感谢您发布此处。

您是否收到其他错误?来自代码的消息?

Did you get other error messages from the code?

对于Windows 10操作系统,如何配置相关属性以允许您要连接的计算机上的远程连接。

For windows 10 operating system, how did you configure relevant property to allow remote connections on the computer you want to connect to.

你关闭了Windows 10的防火墙吗?关于如何关闭防火墙,请参考

链接

Did you close the firewall of windows 10.? About how to close firewall, please refer to the link.

这是 demo
连接到Windows 10或其他系统。你可以参考它。

Here is demo that use the RDP connects to windows 10 or other system. You could refer to it.

最好的问候,

Hart