Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I try to create a remote desktop app. but it dint show any thing.

C#
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");
            }
        }
    }
}
Posted

 
Share this answer
 
@Mehdi Gholam This is not working on windows 8.1. :(
 
Share this answer
 
Comments
VICK 4-May-15 0:40am    
Mehdi would not be able to know about your this comment, but instead he will if you write your comment by clicking on "Have a Question or Comment?" button below the Mehdi,s Answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900