Hi, I am a VB6 programmer that is migrating to VB2005, and have a question on
whether ini files are still the way to go in the .net era. My apps make
heavy use of ini files in vb6, and am trying to decided if maybe I should use
the registry. Any thoughts would be greatly appreciated. Thanks in advance.
Herfried K. Wagner [MVP] - 19 Apr 2006 14:35 GMT
"Vocoder422" <Vocoder422@discussions.microsoft.com> schrieb:
> Hi, I am a VB6 programmer that is migrating to VB2005, and have a question
> on
[quoted text clipped - 3 lines]
> the registry. Any thoughts would be greatly appreciated. Thanks in
> advance.
Check out 'My.Settings' and "My Project" -> "Settings".

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Homer J Simpson - 19 Apr 2006 20:46 GMT
> Hi, I am a VB6 programmer that is migrating to VB2005, and have a question
> on
[quoted text clipped - 3 lines]
> the registry. Any thoughts would be greatly appreciated. Thanks in
> advance.
They are more reliable it seems, as long as no one deletes them. No reason
to stop using them.
Ken Halter - 19 Apr 2006 23:24 GMT
>> Hi, I am a VB6 programmer that is migrating to VB2005, and have a
>> question on
[quoted text clipped - 6 lines]
> They are more reliable it seems, as long as no one deletes them. No reason
> to stop using them.
Especially if the app (correctly) sets default values for each item in the
INI before attempting to read it.... plus, you can get much "easier on the
users eyes" than an INI file. They've been around so long they shouldn't
surprise anyone and the end user can even "muck" with the settings
off-line... if they break something, it's a mixture of their fault and the
developers fault for not range/type checking.

Signature
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
Ken Halter - 20 Apr 2006 19:32 GMT
> INI before attempting to read it.... plus, you can get much "easier on the
ECO #1230044
Was: "plus, you can get"
Is/Should Be: "plus, you can't get"

Signature
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
gene kelley - 21 Apr 2006 07:48 GMT
>Hi, I am a VB6 programmer that is migrating to VB2005, and have a question on
>whether ini files are still the way to go in the .net era. My apps make
>heavy use of ini files in vb6, and am trying to decided if maybe I should use
>the registry. Any thoughts would be greatly appreciated. Thanks in advance.
In addition to the other responses, it seems to me that XML would be
more modern alternative. Have a look here:
http://www.knowdotnet.com/articles/csettings.html
Gene
Homer J Simpson - 22 Apr 2006 00:06 GMT
>>Hi, I am a VB6 programmer that is migrating to VB2005, and have a question
>>on
[quoted text clipped - 7 lines]
> more modern alternative. Have a look here:
> http://www.knowdotnet.com/articles/csettings.html
I use an app which has a couple of .ini files to control it. I can usually
tinker with a file to make the app keep working when the service changes
their web pages and breaks the app. How easy is that to do with XML and
Notepad?
rheitzman967@gmail.com - 20 May 2006 05:40 GMT
While XML is readable editing by hand can lead to errors. As a
programmer you can probably edit the XML config files if you now eactly
what you are looking for.
INI files are much better for user edited settings but the MS
programmer's didn't both to provide INI file support in .Net - to
simple I guess - so you are stuck with some overly complex (but elegant
in the butt heads view) access methods that create files users
shouldn't edit.
MS really dosen't have a replacement for INI files for user settings
making lots of work for people trying to create simple applications.
Too bad MS doesn't hire at least a few programmer's with real world
experience.
Brahm - 25 May 2006 21:47 GMT
Hi, I am a VB6 programmer that is migrating to VB2005, and have a question
on
whether ini files are still the way to go in the .net era. My apps make
heavy use of ini files in vb6, and am trying to decided if maybe I should
use
the registry. Any thoughts would be greatly appreciated. Thanks in
advance.
hey,
our apps. were using .ini but we notice a perfomance lose.. so we
decided to use windows registry because it is too much faster than ini files
daniel
GhostInAK - 02 Jun 2006 08:06 GMT
Hello Vocoder422,
> Hi, I am a VB6 programmer that is migrating to VB2005, and have a
> question on whether ini files are still the way to go in the .net era.
> My apps make heavy use of ini files in vb6, and am trying to decided
> if maybe I should use the registry. Any thoughts would be greatly
> appreciated. Thanks in advance.
Oppinion questions.. gotta love em..
Anyhow.. here's my 2cents.
I prefer to create a Settings or Options class (or hierarchy of classes)
which holds the user's settings.. then I pickle (to borrow a python term)
the objects using either a binary or xml serializer. I prefer the binary
serializer as the user is not capable of hand editing it. Helps prevent
those annoying tech support calls. when the app starts up you of course
deserialize the file back into the object/s. On deserialization you need
to handle nonexistant settings files by providing defaults, and you need
to handle corrupt settings files (which refuse to deserialize) by blasting
the corrupt file and providing defaults.