Application settings....aaarrrggggghhhh !!!!

B

Bart

Hi all,

Sorry for the subject line :)

I am having some trouble with persisting the apllication settings although
it should be easy and straight forward.

From MSDN: ....and persisting the settings between application
sessions.architecture provides a default persistence engine for saving
settings to and loading them from the local file system......

So I have a form and bound the the property location to the aplication
settings. When I look in the Settings.settings file it is there.

So to my understanding when the runs and a user gives the form a new
location on the screen, this new location should stored in the config file.
But this is not happening. What I am doing wrong here?

Thanks for your help,

Bart
 
P

Peter Duniho

[...]
So I have a form and bound the the property location to the aplication
settings. When I look in the Settings.settings file it is there.

So to my understanding when the runs and a user gives the form a new
location on the screen, this new location should stored in the config file.
But this is not happening. What I am doing wrong here?

What file are you looking at? And are you calling the Settings.Save()
method? And also keep in mind that when running under the debugger,
your application actually runs under a different executable (vshost.exe
or something like that, I forget the details) and so the settings file
winds up being in a different place.

It's difficult to answer any question about code, including one like
yours, without some actual code to look at. You should post a
concise-but-complete example of code that reliably demonstrates your
problem.

Pete
 
B

Bart

Peter

Just found out that I have to use 'Properties.Settings.Default.Save()'

Thanks for your help,

Bart
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top