Remote Desktop Connection using C#

remote desktop

Remote Desktop C#

Today we will focus on how to make Remote Desktop Connection with C#. You will soon see how easy it is with the framework 4.0. We just need to add a reference, add a remote master object into the Toolbox, and write a few lines of code.

Build Remote Desktop using C#

By creating a new project, go to the COM components section by calling Add Reference from the References section. Microsoft Terminal Services Active Client 1.0 Type Library reference to find and add to our project. After this process, we call the Toolbox field by right-clicking the Chooses Items. In this section, we go to COM components and find the Microsoft Terminal Services Client control version-1 object and add our object to the Toolbox by saying OK.

Now it’s time to add three textbox, two buttons and Microsoft Terminal Services Client control version-1 objects to our form.

txtIP : We will use this TextBox to enter an IP address.
txtUser : We will use this TextBox to enter the user name we will use when connecting.
txtPassword : We will use this TextBox to enter the password we will use when connecting.
btnConnect : This name implies the Connect button.
btnDisconnect : This name implies that the link on the cut off button.
axMsTscAxNotSafeForScripting1 : The object that we added to the Toolbox for this connection. I didn’t even change the name of that.

Remote Desktop C
Remote Desktop C

Remote Desktop Codes using C#

BtnConnect Codes;

BtnDisconnect Codes;

Yeah, that’s all, Note that the event here is axMsTscAxNotSafeForScripting1 do not leave this object small when you add it to your form. If possible, cover the form. So you can see the screen of the computer you’re connected to.

 

https://fourtex.ru хотите купить стеганыи поликоттон.