Hey Pe3s,
The code you found is a tad hands on and there's loads you have to do by hand, which can be error prone.
Like
@TonyStone mentioned, a better way of doing it is using the
T[XML|INI|JSON]PropStorage.
Opting for any of those, you can have your settings automatically loaded at start up and automatically stored upon close.
And in one of 3 flavours: XML, INI, JSON.
The component even has a generic "bag" of options you can store that are not
RTTI related.
I tend to use the JSON one(Disclaimer: I'm the author and asked the dev to include it on the sources) since I had an itch to scratch and I did scratch it
Hope this gives you a bit more options.
Cheers,
Gus