dcsimg
Results 1 to 19 of 19

Thread: [VB6] Rocketdock Settings Enhancement

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    [VB6] Rocketdock Settings Enhancement

    Excuse if this is in the wrong place, it has some graphics elements so it may fit here.



    I use Rocketdock on all my Windows machines as I find the convenience of the MAC-style dock and the ability to customise is a real boon. Rocketdock was written by Punk Labs (skunkie et al) and was originally written for XP but was never overhauled for NT6 usage. It is no longer supported but it is still probably the best in its class. Rocketdock still functions as it should on Win7/10 but as time went on a few minor bugs crept in that decreased its usability. Nevertheless it is still an enhancement for Win 10 &c as that o/s has a fairly awful GUI and start menu IMHO.

    One of the bugs is the time that RD takes to respond to an icon right click. It appears to have to trawl through each of the dock entries and parse the data before it can display the settings screen. I believe it is also reading the stored library of .ICO/PNG files so it can display a graphical selection of thumbnails for the user to choose. The bigger the icon folder the longer it takes.

    As a result a right click can take 20-30 secs on a typical core2duo with an SSD and even on newer, faster systems there is a many-second delay. In addition, as each thumbnail is being read into memory (to speed up access?) there must be a significant memory overhead reading potentially hundreds of PNG images from the target folder.

    So, I decided to write a VB6 replacement for this one bit of buggy functionality. Firstly, it is the only language where I stand a hope in hell's chance of doing it and secondly, because I am increasingly realising there is a mass of amazing code that can do anything using VB6.

    This is the original settings screen:



    This is my current replacement:


    It has been enhanced so that it loads the portable settings.ini file quickly, it also reads the registry if that is where the user has chosen to store the dock data.

    It improves upon the original in certain areas: It indicates by number which Rocketdock item is currently selected; the user can delete unwanted icons directly from the file display; the ICO file previewed can be resized; you can flip to the next Rocketdock item without having to leave the settings screen; the start path is now selectable using a common dialog box; there are tooltips for all controls (before there were none), there is a help facility; the "get more" button takes you to a useful location where there are a lot more icons for the user to download; the whole thing runs faster. One final improvement is that the dock is only disabled when the native settings screen is used, that does not happen when using mine, ie. Rocketdock is still usable when my utility is running.

    The only difference so far is that the file viewer top right, only displays the icon names and is not yet capable of displaying as thumbnails. I don't know how to do that yet, I am thinking of creating an array of objects that will use LaVolpe's graphical code to simulate a fileviewer in thumbnail mode. If you have any suggestions on how to achieve this I'd willingly take any suggestion.

    I used LaVolpe's code for the previews as it was the easiest to integrate into my design. It can display all the icon types that Rocketdock might possibly encounter.

    So far the new settings screen is very quick to open and do its stuff, certainly much faster than Rocketdock's settings screen.

    I didn't intend to replace Rocketdock altogether, it just bothered me that I'd have to wait 30 seconds to change a simple icon. When I have this covered I'll think about the next thing I can improve.

    I realise it might make no sense to recreate the whole of Rocketdock using VB6. Comments please!
    Last edited by yereverluvinuncleber; Jun 20th, 2019 at 03:58 AM. Reason: typos corrected, added info. Added Rocketdock image, added an improvement, thoughts on memeory usage.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    Making good progress:



    I've managed to simulate a thumbnail view of just 12 of the icons, each downward click on the vertical scrollbar loads another twelve images onto the picturebox array. The loading of just 12 images takes no time at all, much more efficient than loading the whole 836 icons as did the old Rockerdock screen (836 being just one library of steampunk icons from one source), there do exist steampunk libraries of over 3,000 icons.

    I haven't yet figure out how to rescale PNGs loaded with lavolpe's loadpicture method but everything else seems to work. I haven't fully implemented the reading and writing of the registry locations yet but that is close to working. It does the job just as it should if a settings.ini is specified as the output.

    PS. Those are all my very own steampunk icons.
    Last edited by yereverluvinuncleber; May 20th, 2019 at 04:07 AM. Reason: icons

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    Reading and writing the registry works fine now.



    Created a help screen called by button and right-click menu.

    The main trouble with this new utility is that it cannot replace Rocketdock's own icon settings screen. It can't be integrated into Rocketdock as a replacement for the current right-click. It can however be called as one of the icons in the dock.

    I also have an idea to add a mini version of the dock as a hideable element right in the middle of the tool. This would be a map of the dock and then I can emulate the functionality of Rocketdock and make selection and configuration of an icon much easier.


    Just a mock-up.
    Last edited by yereverluvinuncleber; Jun 8th, 2019 at 03:23 AM. Reason: new image

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    The Rocketdock map has been completed, it works as intended and it scrolls left/right by simply sliding all the picture boxes right or left. The picture boxes are created dynamically according to the number of icons found in the Rocketdock settings.

    There is a slider for the map, quite necessary when your dock has 70 or more items. The map is hideable so that you can restore the look and feel of the old Rocketdock settings screen.

    I have added right click menus, 'about' and 'licence' screens.

    I discovered that when I made changes to the settings.ini or the registry then Rocketdock overwrote those changes as soon as it exited. Instead, I have made all the icon changes to an intermediate settings file and only then used that to replace rocketdock's settings once I have killed the rocketdock process. It is then restarted automatically to show the resulting changes in the dock. There is a new save & restart button to implement this. Much more complicated than I expected.


    My first build of the Rocketdock map. The icon map is still having trouble resizing PNG images, I will fix that at the end. It works find for .ICOs.
    Last edited by yereverluvinuncleber; Jun 8th, 2019 at 03:25 AM. Reason: added image

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    I have implemented a backup system that allows the utility to take and store multiple settings files in the form of:

    settings.ini;1
    settings.ini;2
    settings.ini;3

    Each backup causes an increment of the version number (a la VMS) so you can go back to a previous backup of the dock any time you want by simply renaming one of the backup settings files to the current version. A backup occurs automatically each time the utility is operated and there is a new backup request button so that you can take a manual backup if you so wish.

    The treeview now works as intended allowing you to select a sub-folder holding icon collections

    The tool now also pops up the licence screen when it is run for the first time and it remembers any tool-specific settings.

    I have now added the "add item" right click menu allowing the tool to add new icons to the map and thence to Rocketdock after a restart.

    The delete item is next...
    Last edited by yereverluvinuncleber; May 29th, 2019 at 12:07 PM. Reason: progress!

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    o Deletion of an icon from the map has now been implemented.
    o The program can now extract icons embedded within a DLL or an executable.
    o Added a "working" indicator on the initial creation of the map.
    o Add the ability to save copies of the settings files used.
    o Read the user-configured folder on startup and automatically set it in the treeview.
    o Changed the underlying image display code to allow the utility to handle image sizes.


    An image of the utility working on the desktop.

    Still using Lavolpe's code but this time using the code from Lavolpe's prj32bppSuite. It is slightly more CPU-heavy than the earlier version but it works. It also has a problem with dealing with certain ICO types that cause it to display the ICO with lines in the mask leaving black striations. It only occurs with ICO files so some debugging to do.

    It also crashes the IDE when the above bug occurs, causing the vertical scrollbar to freeze and then some short time after that the IDE will close unexpectedly.
    Last edited by yereverluvinuncleber; Jun 8th, 2019 at 04:07 AM. Reason: Updating.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement


    Here is an animated GIF of the utility in operation, forgive the low quality capture. It gives an idea of the way it operates.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    I've been in contact with Skunkie from Punklabs, one of the original developers of Rocketdock who I've known through the internet for a few years now. I didn't want to show her anything until there was something that worked in general. She was pleased to see the development of the new utility and said she was pleasantly impressed. It is always good to get the blessing of the developer of the original tool even though I am writing it from scratch and the only similarity is the look and feel.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    I've added the ability to move an icon in the Icon Map. A simple right click brings the option to 'move item to the left' or to the right. I have prepared some code to allow a specific icon on the map to be dragged left or right to a new location but the way that the cursor currently picks up the icon feels 'wrong' and imprecise so I will revisit that later.



    I've added another built-in icon folder to the treeview for the user to select if he or she so wishes and the delete folder button now removes a treeview parent node, another Rocketdock bug fixed, on the original RD settings tool it did nothing at all.

    Last edited by yereverluvinuncleber; Jun 16th, 2019 at 04:43 AM. Reason: added images

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    o Added F5 keypress to the map and the thumbnail view allowing refresh via keyboard
    o Fixed some bugs re: caption generation
    o Added HOME and END on the rocketdock map
    o Added custom folders containing icon sets
    o Removed a lot of unnecessary code
    o Tidied and commented the code somewhat to make it readable
    o Added mousePointer busy cursor and various point to signify 'working'
    o Testing various methods to extract the larger embedded icons from a DLL or EXE - taken me a while to no avail, so far...

    No new imagery to display. Getting close to completion in many respects.

    I do hope you don't mind me posting this work-in-progress. Personally I find the creation part of a project by far the most interesting. I wish more devs would show this part of a project's inception.

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    I've added an animated busy timer to the central part of my utility that gives a fairly prominent clue that something is going on.



    The slider bar now operates and scrolls the Rocket Dock map from left to right.

    o in the folder treeview renamed the custom folder to "custom" and my own icon collection to "my collection"

    o added a "Generate Dock" that is intended to make a list of software installed on the system and then auto-generate a complete new Rocketdock using known icons that match. Incomplete.

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    In addition to the icon settings utility I have created a VB6 version of the dock settings utility that comes with Rocketdock.



    At the moment it is just a mock-up that does nothing but allow selection of the different panels with the icons on the left. I have to extract the code from the icon settings utility to allow it to read and write from the registry and settings files but that's about it. It should be relatively straight-forward.

    When this utlity is done it will complete the tools that come with Rocketdock allowing it to be fully configured.

    The only real life advantage of using this utility rather than the original is that the dock is still functional while this tool is operating. The other advantage is that the new version will be FOSS and could form a basis for a new and FOSS version of Rocketdock later. I doubt that it will be done using VB6 but that's another story.

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    -oOo-

    On the Rocketdock Enhanced Settings utility I have fixed the bugs surrounding the Rocketdock Map and its slider and it now operates as you would expect.



    To complete, all I need to do is document and tidy the code, fix a few very minor bugs and then test on other versions of Windows (XP and win10)

    I have one serious code change to implement to allow it to extract larger sizes of embedded icons from within EXEs and DLLs but that will be my final fix before I release version 0.9.

    -oOo-

    Updated the help screen, polished a few of the graphics, working on the code to read the larger icons, just need to get it to work!

    On another note, how annoying is it to create something only to find later that a control exists to do exactly that sort of functionality already? I didn't realise that there was an extant imagelist control and I created something just like it by hand... oh well, you live and learn.

    Also added the ability to change the font for all labels and visible text boxes, I do like to have the facility to customise a tool and think it should be present in all Windows programs across the board. Too many programs have a font hard-coded in.


    An image of the utility sporting the Centurion Light font:
    Last edited by yereverluvinuncleber; Jul 13th, 2019 at 12:46 PM. Reason: added image

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    I've managed to extract larger icons than 16x16 or 32x32bpp from being embedded within DLLs and EXEs. The World of Tanks Icon in the image below is an example, it is 256bpp.



    Removed documentation for PrivateExtractIcons to another thread here:
    http://www.vbforums.com/showthread.p...m-a-DLL-or-EXE
    Last edited by yereverluvinuncleber; Jul 15th, 2019 at 04:09 PM. Reason: Removed documentation for PrivateExtractIcons to another thread

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    Probably my final animated GIF - shows the utility using the Mostra one font, It all works, at least everything I originally had planned for it.



    I now need to package it up so the binary, the settings.ini and the .OCX files are all bundled in a single SETUP.exe. I have not yet found a packager that does what I need, my old packager setup2go does not place the ocx files in the correct location nor does it check the versions to avoid DLL hell. I had expected that on a mature location such as this that a suitable tool would have been created long ago but I seem to be unexpectedly disappointed.

    If anyone knows of a good packager then I'd be pleased to take your recommendation.

  16. #16

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    Well, bar one bug I have finished the tool and it works in all respects just as I planned it. I am rather pleased. I encountered a rather unexpected and for me a large stumbling block with regard to the packaging of the utility as described above.

    As we all know VB6 projects often utilise objects called OCXs. For those that don't know these are packaged libraries of functionality that provide additional functions to your program such as common dialog boxes (file open/save) or treeviews to your GUI or similar. These OCXs are bound to your program and are required to be present and 'registered' on the target system. This wasn't a problem when VB6 was young as I believe all or the majority of windows machines had these OCXs available and present - but as time has gone on, the later versions of Windows may not have them, might have a different version but they certainly won't be registered.

    So there is the problem. How to bundle the OCXs with my binary and have them automatically placed - correctly into C:\windows\system32 for 64bit systems or C:\windows\sysWOW64 for 32bit systems - and then registered using administrator rights. I have looked for packagers that understand VB6's specific requirements (with no luck or they cost good money), I have tried creating SxS or side by side manifests (another bad solution provided by MS) that always seems to fail due to one thing or another. I've spent spent hours on this and all I want to do is to package my binary...

    In the end I gave up on all that, brought out an old tool I have in my arsenal - setup2go, a fully-functional free packager with a decent GUI that does all that I want.



    In addition I wrote my own VB6 tool for dealing with OCX distribution and registration. That is what I am testing now. A little more testing and I'll have it finished soon and my VB6 project will be complete and available for download. I expect that as many as four to five people will download it per week... if I'm lucky.



    My OCX registration tool - first cut - no nonsense.

    I'll have to find some good places to distribute it. In truth, the number of users does not really matter. For me it was a technical challenge to free up the brain cells, to learn new techniques and see how well an old technology is suited to resolving current day problems. In one sense I also created it purely for myself to keep Rocketdock usable under Windows 7/10 today and in the future.



    The splash screen shown during installation.

    The next step is to migrate the exact same design to VB.NET and to learn the perils and pitfalls of that process, going from a cosy place to an unknown one. When I was a Project Manager I managed people to do this sort of thing for me but without ever really going through it on a technical basis myself. Now I am doing the technical role, I can appreciate how complex design and coding really was.

    -oOo-



    I've added some right-click menu options to the icon map allowing you to assign various functions to pre-selected icon images. I am also adding the same selection options to the icon target selection button.

    In addition, if the user closes the utility with the Rocketdock map showing, the map state is remembered when the tool is re-opened. Just a few minor improvements but these little changes make all the difference.

    -oOo-

    I've removed the need for one of the additional OCX files, the one that provides the rich-text control used for the licence display and auto-generated software list. Instead of rich-text boxes I now use a simple listbox which is part of core VB6 and thus does not require this additional functionality. It means that one of the external dependencies has been removed. I aim to remove the remainder of the required OCXs but that will be more difficult than you might expect and might take a while.

    I am working on the thumbnail display (top right) to make it act more like its Explorer counterpart with regard to keyboard presses.
    Last edited by yereverluvinuncleber; Aug 28th, 2019 at 04:49 AM.

  17. #17
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    351

    Re: [VB6] Rocketdock Settings Enhancement

    beautiful

  18. #18

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    Quote Originally Posted by xxdoc123 View Post
    beautiful
    Very kind. Your positivity appreciated.

    My creations tend to be more focussed on the look-and-feel of the app. Secondly, the functionality and I suppose any expression of programming ability probably comes last of all. I just code and do what comes into my head rather than planning and documenting. When I eventually release the program source code I expect some criticism of my terrible (though improved) programming methodology. I'll have to develop a thick skin.

    Thanks again.

  19. #19

    Thread Starter
    Addicted Member
    Join Date
    Feb 2014
    Posts
    226

    Re: [VB6] Rocketdock Settings Enhancement

    I have added a debug mode:



    This will help users to report bugs if there are any. When you are debugging a program it is relatively easy to carry out using VB6's built-in IDE whilst the code is being interpreted. However, runtime bugs that are generated after compilation are more difficult to find. This utility was written by a VBforum contributor by the name of Elroy. It makes it much easier to see which function ran last prior to a bug being generated.

    -oOo-



    I have managed to remove another of the external dependencies, namely the common dialog box. I am using direct calls to system APIs to open dialog boxes for font, folder and file selection. This removes one more OCX that was previously required to be bundled with my compiled exe, comdlg32.ocx.



    Just one more OCX to go, that being comclt32.ocx which provides a slider and treeview functionality, I can re-code the slider myself but the treeview will be a bit more tricky. I have a version that is working, I just need to perfect it.
    Last edited by yereverluvinuncleber; Sep 17th, 2019 at 07:44 AM. Reason: Added images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width