Settings.Save (gb.settings)

Sub Save ( )

Saves the configuration file to the disk.

This is automatically done when the setting object is freed.

If no settings has been modified, this function does nothing.

The file is entirely re-written from scratch. Consequently, all comments line and the original line order are lost.

Since 3.7

Since Gambas 3.7, only the modified settings are really saved. That allows to share the same settings file between two applications running simultaneously.

Warning.
When you quit the program the settings are automatically saved but if your program is running in the background and your computer is shutdown it will hard exit and not save the settings. so if your program is likely to exit because of a system shutdown and not manually then you should use this function to Save() the settings as they are changed and not leave it for when the program exits normally as it won't exit normally.