I have been doing some research on the net, and found many ways of doing this, but it all leaves me with the same question. Wich one is the better to use?

What i want to do, is a simple yet stable configuration system for any of my projects that are done in VB.NET.

So, the articles I found around the net shows configuration methodswith XML files for the app.config, or the web.config for asp.net, some of them say that the use of INI or write to the registry, are out of use or obsolete BUT are good if you are making changes on LEGACY platforms.

My intention is only (at this time) store variables like connection strings, global variables that are changing constantly (like exchange rate, etc.) and yes, configuration for the winForms (color, font, etc.)

Do you have a good system and want to share it?, can you foward me to a link that has step by step coding.

What kind of system do you implement in your projects?

That all. Have a nice day
El Vala

Recommended Answers

All 2 Replies

A really easy way (today) is to use the settings of the application.
Can be easily acessed through the My.Settings class and, if you need to change any of the values to be recognized on the next run, they can be saved using the My.Settings.Save method

The settings class supports many types of data and also supports collections of strings.

Also you can define the scope (user o application) so many of the colour, fonts, etc. are set per user basis while connection strings or exchange rates can be set at application level (for all users)

Hope this helps.

You can also use the (ApplicationSettings) located in a control's Properties.

For example, Label1:
Double-click or click the little arrow for (ApplicationSettings), which should be located at the very top of the Label1 Properties.
Locate Text, click the litte arrow and select (New...).
Give it a unique Name,press OK, and Done.:)

Run your application, change text for Label1 and restart your application. The text should have been restored as previously left.

You can also select different options to save from selecting the (PropertyBinding).

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.