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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.