clsSettings
One of the most important changes under-the-hood in moDesktop 2 is this little fellow:
![]()
It’s a class that loads and saves settings for moDesktop. Sounds pretty basic for an application, but that’s not the important thing here. The important thing is that this class handles the storage of all settings.
In earlier versions of moDesktop the storage of all settings have been a bit… messy. The first version used a single ini-file. When I added a few new features, I started using the Registry in Windows, but only for a few features. When Microsoft introduced UAC in Windows Vista I had to move the Ini-settings to the user’s Application Data-folder. So it was pretty mixed up. Mixed up settings also means mixed up code. Some settings used way to much code to remember things.
But since moDesktop 2 was written from scratch, I could make a single class that would handle all kinds of settings. So from now on, all settings are as default stored in the Registry.
But that’s not all. The Registry is nice, especially since all users can have their own settings, but sometimes you may want to use your settings on a lot of computers. In moDesktop 2 it’s easy to make the application portable. Just install it on your USB-memory (or wherever) and make a file called modesktop.ini in the same folder as the executable.
moDesktop will then ignore the Registry and store all settings in the Ini-file instead. That’s the power of clsSettings.cls :)