[RESOLVED] Using new my.settings after application restart
I'm still a very new to vb2008, coming from vb6. I've been searching my head off, trying to find a solution but can not find it.
The problem is as follows.
I'm using my.settings to store different communication parameters. After changing parameters, for several reasons, it's easier to restart the application then to re-initialize all objects/variables/etc using program code.
When I change my.settings and use save to save them. When I quit the application and manually start it again, the newly saved settings are used.
When I use either .restart, or application.exit in combination with process.start. The application will use the old values for my.settings.
If I read up on .restart there's a remark mentioning that it will restart the application using the initially used settings.
Before restarting the application, I manually checked if the new settings were really save to the user.config file, and they were.
Is there a way to restart the application using either .restart, or application.exit in combination with process.start which will use the newly saved my.settings values?
I've now tried it both. First I tried using my.settings.reload then using my.settings.reset in the load event of the main form. Restarting the application I used either .restart, or application.exit in combination with process.start.
Unfortunately to no avail. In all 4 possible setups, after restart, the application used the old my.settings values.
If there's anyone whom might have another suggestion, I would appreciate any input on this frustrating issue.
Re: [RESOLVED] Using new my.settings after application restart
I'm already try your code but still it can't solve my problem.
yes..when i use application.restart my.setting value is correct now.
But when i close the program manually, and then i start the program again without using application.restart, my.setting value is not the new one but the old one now..
it's the opposite from the problem that droopy928gt post.