Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

configuration file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Maileen - 24 Oct 2004 09:57 GMT
Hi,

I would like to use a configuration file for my application.
usually i use an *.ini file for that which is from my point of view
easier for multi distribution site.
this configuration file can be set up in some way that after user can
redistribute it without any trouble.

From my point of view it's better than any registry value.
Because how to export very easily all keys and value from 1 PC to
another one ?

Anyway...does anyone have a better idea than using an *.ini file ?
i need to have something really easy to export / import for next
installation of my application on different places.

thanks a lot,
Maileen
One Handed Man \( OHM - Terry Burns \) - 24 Oct 2004 10:08 GMT
Yes, use the app.config file ( XML ), then you can use the
System.Configuration namespace to read your settings

Regards - OHM

Signature

OHM ( Terry Burns )   * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
    ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--

> Hi,
>
[quoted text clipped - 14 lines]
> thanks a lot,
> Maileen
Herfried K. Wagner [MVP] - 24 Oct 2004 12:00 GMT
"Maileen" <nospan@email.com> schrieb:
> I would like to use a configuration file for my application.
> usually i use an *.ini file for that which is from my point of view
[quoted text clipped - 9 lines]
> i need to have something really easy to export / import for next
> installation of my application on different places.

If you are talking about configuration settings, then use an "App.config"
file.

If you are talking about user preferences:

Storing and loading user preferences
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=userpreferences>

Signature

Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/

Larry Serflaten - 24 Oct 2004 12:39 GMT
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote

> If you are talking about user preferences:
>
> Storing and loading user preferences
> <URL:http://dotnet.mvps.org/dotnet/faqs/?id=userpreferences>

Unfortunately, none of them (that I saw) include examples of
saving an Image....

Bummer!
LFS
scorpion53061 - 24 Oct 2004 13:17 GMT
Larry,

What is it you seek to accomplish with the image?

> > If you are talking about user preferences:
> >
[quoted text clipped - 6 lines]
> Bummer!
> LFS
Richard L Rosenheim - 24 Oct 2004 14:06 GMT
You can't save binary data directly to a XML file.  But, you can convert the
image to a Base64 string and save the resulting string to the XML file.

> > If you are talking about user preferences:
> >
[quoted text clipped - 6 lines]
> Bummer!
> LFS
scorpion53061 - 24 Oct 2004 12:29 GMT
Hi Maileen,

Use XML for such settings.

http://www.kjmsolutions.com/xmlsettings.htm

> Hi,
>
[quoted text clipped - 14 lines]
> thanks a lot,
> Maileen
Dennis - 24 Oct 2004 14:45 GMT
Maileen, the easiest way that I have found (it came from someone on this
newsgroup) was to create a class using various properties to save all your
settings and user preferences and whatever else.  When theh program exits,
serialize the class and save it to a file.  When the application starts, read
the file and deserialize it back into the Class.  You then have all your
settings and user preferences available thru the class properties.

> Hi,
>
[quoted text clipped - 14 lines]
> thanks a lot,
> Maileen

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.