I wasn’t able to blog much lately. Mostly because of piled up work but also family business is keeping me busy.
However, today Version 1.6.7 was released. This update is free for all users with a Royal TS 1.6 license and can be downloaded from here: http://www.code4ward.net/main/RoyalTS/Download.aspx
It’s been a while since the last release and most of the changes in this release are bug fixes. The last refactoring caused some very weird bugs which were hard to find and harder to fix. Here some of my lessons learned:
The tree view and the web browser control from Windows.Forms namespace are buggy as hell and one of the weirdest issues with these controls are focusing issues. Of course there are workarounds for most of the issues but since the dashboard has a web browser control (for displaying the notes) the interaction between the web browser control and the tree view control are causing headaches as hell.
For once, the tree view has some serious focus issues. Trying to move the focus away from the tree view after the selection changed causes the tree view to steal back the focus after the event chain was processed. There are some workarounds for this and I think during all my Royal TS releases I tried every single one available.
The web browser control has similar issues. When you set the contents for the web browser control using the DocumentText property you always get this annoying click sound. As a workaround you can set the contents using the Document.Write() method – which is not causing the click sound. The side effect however is, when you set it this way, the control starts to steal the focus back when it got the focus once (e.g. if you click inside the control or on a link). Now with all the focus stealing there’s no way to predict which control will get the focus after all.
So I was forced to use a 3rd party tree view control, which unfortunately will blow up the footprint of the installer package a bit. But the good news is, that it’s nicer, not so buggy – at least not with all the ordinary stuff, has plenty of options and provides a very easy approach to implement drag & drop.
So now you can use drag & drop to reorder folders or move connections within or between folders, including a nice drop marker as shown in the screen shot.
Holding down the CTRL key while dragging will duplicate a connection instead of moving it. Watch the icon with the “plus” sign.
You can also drag multiple connections from the list to the tree view as well!
So while I was at it and touched the tree view code, I took the opportunity to make sure that the selected item stays highlighted even when the focus is inside a session. So everybody should be happy now to see very clear which session is active. Another thing I did, was optimizing the code to build the tree and the list. It’s now very fast, even when you have several hundred connections.
Replacing the tree view resolved some of my headaches but, the web browser control still wants to steal the focus. So back to the start. I need to set the content using the DocumentText property, at least I get rid of the focus stealing issue. But how to disable the click sound. Fortunately when we deal with IE7 and IE8 there’s a Win32 API call to disable that very annoying “feature”: CoInternetSetFeatureEnabled().
I haven’t tested it, but my guess is that users with IE6 will have the click sound when changing the selection in the navigation tree. If you get annoyed and want to commit suicide, go to the system sounds and disable the click noise (which will be effective on all IE browsers on your system) or upgrade to IE7 or IE8.
What else changed? In order to prepare everything for the new document model I changed some terms and menu item names. I also tried to use terms and keyboard shortcuts already well known from the windows shell.
Add and Remove changes to Insert and Delete (Del as the keyboard shortcut). In future Insert will have a sub menu where you can choose Folder, Credential, Task, Remote Desktop Connection, Web Connection, etc.
Edit was changed to Properties (Alt+Enter as keyboard shortcut). I always felt that “Edit->Edit” just doesn’t sound right. “Edit->Properties” is much nicer. I know these are some minor cosmetic changes but as many of you may already know the love and passion to details is driving me.
I should also mention that you can also hit F2 when you just want to change the name of a tree or list item!
Speaking of detail: I already use the Windows 7 / Windows 2008 R2 Remote Desktop Service icon to identify a remote desktop connection in the tree (as usual as black for inactive and green for active connections). Besides that I set the greenish icon as window icon for connections in external window mode. This way you can easily distinguish the main window of Royal TS and all the external windows from Royal TS when you use Alt+Tab for example.
Finally I want to thank all beta users for their support in identifying bugs and for constructive discussion on features. I hope you enjoy the new build.