The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Using ini-files with VB 6.0

I must be getting daft, but I can't seem to find how to read old-fashioned ini files with VB 6.0.
All I can seem to find is about reading from and writing to the registry.
Can someone push me in the right direction?
Mind you, I am not a programmer, just a hobbyist trying to have some harmless fun with his computer, so please don't be to harsh when you point out the bleedin' obvious.
Practical Geezer
Friday, September 03, 2004
 
 
Sassy Send private email
Friday, September 03, 2004
 
 
Thanks, but that is not what I meant. I meant native VB code for reading and writing ini's.
Practical Geezer
Friday, September 03, 2004
 
 
I use the API functions in the GetPrivateProfileString family...
Joel Spolsky Send private email
Friday, September 03, 2004
 
 
Thanks Joel,

that was what I was looking for.
Practical Geezer
Friday, September 03, 2004
 
 
Put this in your Favourites:

http://vbnet.mvps.org
_
Friday, September 03, 2004
 
 
Oh, I guess I'm a little late on this one (and the OP doesn't have a mailto), but I'm willing to let you have a class I wrote that just purres with ini files.

This class has been tested in various projects for over 4 years and has had a lot of bugs fixed. Access works with properties, something like:

Set oSettings = New CIniFile
oSettings.sIniFile = "C:\Path\File.ini"
oSettings("Section", "Key") = "Hello, World!"
MsgBox oSettings("Section", "Key")

Has stuff for handling booleans, longs, looping through sections (for when you have multiple keys with the same name) and anything else that can be done with the *PrivateProfileString APIs.

In fact, I should post this to my blog!
Daren Thomas Send private email
Thursday, September 09, 2004
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz