0

Hi,

I have one MDIApp running, at this time I need to create some configuration windows to ajust some parameters that provides to the childwindow contents some ajusts.

My problem is, which is the best way to create this config windows? How can I store the information for a next future use? If the user choose some option in that config win (like font default Arial in some textbox) and start the application again, this option should be as he left the last time.

Thanks

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by sknake
0

Hi,

I have one MDIApp running, at this time I need to create some configuration windows to ajust some parameters that provides to the childwindow contents some ajusts.

My problem is, which is the best way to create this config windows? How can I store the information for a next future use? If the user choose some option in that config win (like font default Arial in some textbox) and start the application again, this option should be as he left the last time.

Thanks

you can store settings by double clicking on Properties in the solution explorer, by default on the right hand side of your screen. and then choosing settings. Under settings create your variables here, they have drop downs to select the type (string,bool,int etc...)

now you can use them in your code. On form load to restore defaults and in your config section to set them.

Properties.Settings.Default.myColor = Color.AliceBlue; 

txtName = Properties.Settings.Default.myName; 

Properties.Settings.Default.yourVariableHere = "someatribute";

after setting you proporty you need to save it

Properties.Settings.Default.myColor =Color.AliceBlue;
Properties.Settings.Default.myName = "Scott"; 

Properties.Settings.Default.Save

Im not sure the exact name of the file but it will be saved as an application config file on the users machine.

Edited by scottlafoy: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.