Click here to Skip to main content
15,914,400 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm new to the programming world, now I'm trying to figure out how I can use this app.config to save the settings.

Could any of you show me a simple, functional example?
Like a checkbox and a button, when you checkbox the button is disabled and save this setting in the configuration file.

What I have tried:

I have not tried anything yet
Posted
Updated 25-Jun-18 21:01pm
v2
Comments
Ralf Meier 25-Jun-18 9:19am    
I'm not sure what you try to achieve ...
All Settings which are done with/to the Controls in your Application during Designtime are saved/stored inside the Designer-Files.
If you have some Settings which are done during Runtime - this means something like Parameters - you have to build your own Parameter-File where those Settings are saved/stored. This Parameter you have to load with the Start of your Application and to save perhaps when changes are done ...
RafaelFranckilin 25-Jun-18 9:40am    
I want when I mark a checkbox, save this information in an xml configuration file, when to execute the application, it reads the xml and the checkbox already appears checked, understand?
Ralf Meier 25-Jun-18 15:52pm    
Of course ... I understand and that is exactly what I have written - you name it 'configuration-file' - I name it 'parameter-file'.
So ... to help you - at which point (exactly) do you stuck ?
RafaelFranckilin 26-Jun-18 7:58am    
I understand
I need a simple and functional example of a parameter file for a form, with key and value creation, reading, deleting and updating, can be in XML or TXT.
Can you help me?

1 solution

Please, check out OriginalGriff[^]'s tips:

1. Save and restore your form size and location[^]

Quote:

The easiest place to save this is in the Application config file


2. Where should I store my data?[^]

Quote:

Windows has a number of places that are free for data storage and which will not cause "Access Denied" exceptions when you try to write to them - unfortunately, the default directory is not one of them.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900