Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INI files

Status
Not open for further replies.

tg2003

IS-IT--Management
Feb 6, 2003
270
0
0
IL
Hi,

I'm a VB.NET rookie and I'm migrating to VB.NET an VB6 application.

My question is regarding to INI files: I know it's possible to work with INI files in .NET (I read about, I just have to use some other functions and API calls). Actually, I would like to know if there are any new and better technology to save permanent data. May I use the registry instead of INI files? Alternatively, some other solution?

Thanks in advance!
 
Providing it isn't sensitive data you want to store why not use application settings from within your .net project.

Access it by selecting "Project" on the menu bar then "Your Project Name properties", this will bring up a new window where you can select the tab called settings and then you can add what ever data you want to store.


Hope this helps.

Matt
[rockband]
 
Several ways. You can use the registry. SaveSetting() and GetSetting() still exist to work with the registry as in VB6. There are also other, more liberal ways to access the registry. See My.Computer.Registry for example.

The method Matt is referring to is the app.config (or web.config for ASP.Net projects) settings file. This creates an XML settings file for your application. It's become easier to use and more robust with VS 2005 and later. It would be the most common method that's used to save settings for an application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top