Philippe734 wrote: ↑Tuesday 24th March 2020 3:31pm
...I need to create the settings conf file when the first time running, please, how to do ?
I don't think you can control the way the Setting feature generates the config file (i.e. it always waits until your program is closing to do this, even if you put "Settings["Stack"] = 55" anywhere other than the "Public Sub Form_Close()" event.
But if its really important to you, just check when your program starts whether there in a .conf file. If not create one, something like:-
Public Sub Form_Open()
If Not Exist( {... / Application.Name & ".conf"}) Then
{create ... / Application.Name & ".conf"}
Endif
End
I don't think you can control the way the Setting feature generates the config file (i.e. it always waits until your program is closing to do this, even if you put "Settings["Stack"] = 55" anywhere other than the "Public Sub Form_Close()" event.
You can force the settings to save with Settings.Save.
Are you surre it works?
I gave up using [gb.settings] for that very reason. Further more, it seems it has a weird bug related to a certain sequence of characters, that if used for sometime, triggers a "NULL" error. That points me to a memory leak that propagates somehow and extends over the app.
Namely...
I used [gb.settings] in a previous version to do exactly this: save settings. While the code worked flawlessly for 3 weeks, one day the "NULL Error" popped up and I had to spent many hours to fix the whole app.
I simply feel knocked down by that!
How the heck can a code that works and is untouched for more than 20 days to get scrambled? In a sudden?
It's unbelivable!
The word that triggered the "NULL" error was "Preferences". I can barely figure out what that means. It feels to me like being in the middle of nowhere...
Two questions:
1. Why did it work for THREE WEEKS day after day, after day, countless hours (sometimes over 15 hours...)??!
2. IF IT WORKED, then how come that it ceased working? SAME CODE? Untouched?!
While I can understand that my programming skills are way below fixing this kind of things, my understanding fades away when it comes to a thoroughly tested coode that one day, refuses to work.
There is an explanation, though. Quantum resonance. But that is far more complicated than I like.
“The only thing necessary for the triumph of evil is for good men to do nothing.”― Edmund Burke; It's easy to die for an idea. It is way harder to LIVE for your idea! (Me)