Click here to Skip to main content
13,558,778 members
Click here to Skip to main content
Add your own
alternative version


305 bookmarked
Posted 1 Aug 2007
Licenced CPOL

Palantir - Remote Desktop Manager

, 6 Aug 2007
Rate this:
Please Sign up or sign in to vote.
Palantir is an application that allows users to manage remote desktop connections in one window. It also allows users to save existing connections for later use.
Screenshot - palantir.jpg

Screenshot - palantir3.jpg


Palantir is an application that allows users to manage remote desktop connections in one window. It also allows users to save existing connections for later use.


The remote desktop connections are managed with Microsoft RDP Client control. This control has all of the properties such as Server, UserName, Domain, etc. in order to set up a remote desktop connection. In addition to these properties, sharing printers, disk drives or color depth of the remote desktop can be managed via RDP Client control. Palantir enables users to create a remote desktop connection and save connection settings for later use. Users can also choose to start a remote desktop connection automatically when the application starts.

The settings can be saved into a file and restored from a setting file. Users can also connect to a computer via console. The application has a class named Machine that stores a remote desktop connection's properties. All of the remote connections created by user is stored in application's .settings file. This setting file has a property setting named MyMachine and its type is string. This property is converted into Hashtable while getting the settings. Palantir's solution consists of four projects which are GUI, Helper, BusinessObjects and a setup project.

Using the Code

The remote desktop connections are retrieved by the function below:

public List<Machine> GetRemoteDesktops()         
    List<Machine> lstMachine = new List<Machine>();             
    if (Settings.Default.MyMachine != "")             
        Hashtable ht = 
        foreach (DictionaryEntry de in ht)                     
            Machine insMachine = (Machine)de.Value;                     
    lstMachine.Sort(delegate(Machine m1, Machine m2) 
        return m1.RemoteDesktopConnectionName.CompareTo(
    return lstMachine;         

As seen in the code, this function deserializes the setting named MyMachine into a hashtable and inserts each dictionary entry in the hashtable into a list and returns the list. A remote desktop connection is saved and edited by the function below:

public bool SaveRemoteDesktop(Machine parMachine, bool openedForEdit)   
    if (Settings.Default.MyMachine == "")
        Hashtable ht = new Hashtable(); 
        Settings.Default.MyMachine = BinarySerializer.ToBinary(ht); 
    Hashtable ht1 = 
    if (!parMachine.SavePassword) 
        parMachine.Password = "";             
    if (!openedForEdit)             
        foreach (DictionaryEntry de in ht1)                 
            if (((Machine)de.Value).RemoteDesktopConnectionName == 
                MessageBox.Show("There is already a 
                                    remote connection with the same name.");                         
                return false;                     
    ht1[parMachine.RemoteDesktopConnectionName] = parMachine; 
    Settings.Default.MyMachine = BinarySerializer.ToBinary(ht1);
    return true; 

If there's no currently saved remote desktop connection, we create a new hashtable and then serialize and save the settings file. After that, we deserialize the settings parameter into a hashtable and after checking if there's another connection with the same name, we save the remote desktop connection with the function's parameter Machine object. The methods below set the RDP Client control's settings and connect to the remote desktop which is passed as parameter.

private void SetRdpClientProperties(Machine parMachine)   
    rdpc.Server = parMachine.MachineName;             
    rdpc.UserName = parMachine.UserName;             
    rdpc.Domain = parMachine.DomainName;             
    if (parMachine.Password != "")             
        rdpc.AdvancedSettings5.ClearTextPassword = parMachine.Password;   
    rdpc.AdvancedSettings5.RedirectDrives = parMachine.ShareDiskDrives;     
    rdpc.AdvancedSettings5.RedirectPrinters = parMachine.SharePrinters; 
    rdpc.ColorDepth = (int)parMachine.ColorDepth;             
    rdpc.Dock = DockStyle.Fill;           
public void Connect(Machine parMachine)         
public void ConnectViaConsole(Machine parMachine)         
    rdpc.AdvancedSettings5.ConnectToServerConsole = true;    


For bug reports and suggestions, feel free to contact me at


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


About the Author

Isil Orhanel
Web Developer
Turkey Turkey
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionMy vote of 5 Pin
Földi Giliszta24-Apr-12 3:38
memberFöldi Giliszta24-Apr-12 3:38 
Questioni need help Pin
jeferson Medeiros13-Mar-12 16:07
memberjeferson Medeiros13-Mar-12 16:07 
GeneralParabéns muito bom Pin
MMatani15-Dec-11 7:30
memberMMatani15-Dec-11 7:30 
GeneralRe: Parabéns muito bom Pin
jeferson Medeiros13-Mar-12 16:10
memberjeferson Medeiros13-Mar-12 16:10 
Questionremote desktop Pin
mohanrajkiller12-Nov-11 3:38
membermohanrajkiller12-Nov-11 3:38 
QuestionWhat should I enter in Machine Name, Domain, Username and Password? Pin
donvsme20-Oct-11 6:22
memberdonvsme20-Oct-11 6:22 
Question:( Pin
kusum nayal20-Oct-11 2:48
memberkusum nayal20-Oct-11 2:48 
Questiongood work Pin
kusum nayal20-Oct-11 0:47
memberkusum nayal20-Oct-11 0:47 
is it work over internet .....................i want to create an application where one pc have domain and others pc not so plz give me any idea about this ..................plz explain this code sequentially from beginning...............

plz replay fast as soon as possible...................
GeneralMy vote of 5 Pin
ma_guangming14-Oct-11 20:07
memberma_guangming14-Oct-11 20:07 
Generalnice article Pin
AJMAL SHAHZAD11-May-11 20:58
memberAJMAL SHAHZAD11-May-11 20:58 
GeneralMy vote of 5 Pin
longkk21-Apr-11 15:56
memberlongkk21-Apr-11 15:56 
GeneralTebrikler / Congratulations Pin
hepicoder5-Mar-11 11:17
memberhepicoder5-Mar-11 11:17 
General5 For my vote Pin
babakzawari2-Mar-11 9:43
memberbabakzawari2-Mar-11 9:43 
GeneralMy vote of 5 Pin
SAKryukov19-Feb-11 10:13
memberSAKryukov19-Feb-11 10:13 
GeneralLooking at the remote desktop template, help with automating acknowledgement of the legal banner Pin
turbosupramk327-Dec-10 7:57
memberturbosupramk327-Dec-10 7:57 
GeneralMy vote of 5 Pin
amitsinh parmar21-Dec-10 0:32
memberamitsinh parmar21-Dec-10 0:32 
GeneralAdditions Pin
Daaron30-Apr-10 11:48
memberDaaron30-Apr-10 11:48 
QuestionHow to access an IP that is behind the NAT router ? Pin
dmuntoiu6-Mar-10 1:57
memberdmuntoiu6-Mar-10 1:57 
AnswerRe: How to access an IP that is behind the NAT router ? Pin
grantmaster26-Sep-12 6:40
membergrantmaster26-Sep-12 6:40 
GeneralRe: How to access an IP that is behind the NAT router ? Pin
Joe Escalona26-Sep-12 7:35
memberJoe Escalona26-Sep-12 7:35 
Generalproblem when auto connecting Pin
atropos073-Mar-10 21:24
memberatropos073-Mar-10 21:24 
GeneralGood Work Pin
Nezam Ahamed22-Feb-10 18:37
memberNezam Ahamed22-Feb-10 18:37 
Generalbeautiful! Pin
kanbang11-Aug-09 23:03
memberkanbang11-Aug-09 23:03 
Questioncan u please tell now i am getting this error after change AxMsRdpClient5 to AxMsRdpClient2 Pin
ravileeladhar20-Jul-09 7:42
memberravileeladhar20-Jul-09 7:42 
GeneralException ::Error 8 'AxMSTSCLib.AxMsRdpClient4.AdvancedSettings5' is not supported by the language Palantir Pin
ravileeladhar9-Jul-09 7:40
memberravileeladhar9-Jul-09 7:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180515.1 | Last Updated 7 Aug 2007
Article Copyright 2007 by Isil Orhanel
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid