   Help for IniCon

IniCon is a Visual Basic custom control that will make access to INI files easier.

About/Copyright

Usage

Layout

Properties


Usage

Reading from WIN.INI

Set Filename property to blank

Set Application property to the name of the application section in WIN.INI

Set Parameter property to the name of the entry within the section

Read value in Value property (it now contains the value of the profile string specified by Application and Parameter)

Writing to WIN.INI

Set Filename property to blank

Set Application property to the name of the application section in WIN.INI

Set Parameter property to the name of the entry within the section

Write value into Value property (this will write the value given into the profile string specified by Application and Parameter)

Reading from a private INI file

Set Filename property to the path and filename of the private INI file

Set Application property to the name of the application section in the private INI file

Set Parameter property to the name of the entry within the section

Read value in Value property (it now contains the value of the profile string specified by Filename, Application and Parameter)

Writing to a private INI file

Set Filename property to the path and filename of the private INI file

Set Application property to the name of the application section in the private INI file

Set Parameter property to the name of the entry within the section

Write value into Value property (this will write the value given into the profile string specified by Filename, Application and Parameter)


Layout

If you look in an INI file (WIN.INI is a good example) you'll see many profile strings broken up into sections.  Section headers are formatted as follows:

[Application Name]

In each section there are profile strings.  Each profile string is identified by a an entry name.  These lines are formatted as such:

Parameter=Value


Properties

IniCon supports most of the usual control properties.  On top of those, here are the additional properties that IniCon supports:

Application

Filename

Parameter

Value


Parameter Property

Description

Sets filename of INI file to use.

Usage

[form.][label.]Parameter[ = parameter$]

Remarks

This property determines which line in an application section of an INI file to use.  This property must be non-blank.  When a new value is written to this property the value specified by this property, Filename, and Application, is read into the Value property.

Data Type

String


Filename Property

Description

Sets filename of INI file to use.

Usage

[form.][label.]Filename[ = filename$]

Remarks

This property determines if IniCon uses a private INI file or WIN.INI.  If this property is blank, profile strings are read from and written to WIN.INI.  If this field is not blank, profile strings are written to and read from the file specified in this property.

When a new value is written to this property the value specified by this property, Parameter, and Application, is read into the Value property.

Data Type

String


Application Property

Description

Specifies what part of the INI file to use.

Usage

[form.][label.]Application[ = application$]

Remarks

This property determines which application section of an INI file to use.  This property must be non-blank.  When a new value is written to this property the value specified by this property, Filename, and Parameter, is read into the Value property.

Data Type

String


Value Property

Description

Value of profile string identified by Filename, Application and Parameter properties.

Usage

[form.][label.]Value[ = Value$]

Remarks

This property serves two purposes: to read the value of a profile string from an INI file, and to write a profile string to an INI file.  When a program reads this property, the profile string is read from the INI file.  When a program writes to this property, the value written is put into the INI file specified.

Data Type

String


INI Files

An INI file contains profile strings.  Windows programs keep configuration and other pieces of static data them.  INI files are managed by the Windows API functions GetProfileString, WriteProfileString, GetPrivateProfileString, and WritePrivateProfileString.


About IniCon

IniCon was written by James Shields.  Inquiries can be sent to 71231,2066 on CompuServe, or 71231.2066@compuserve.com on Internet.  If you must send something via U.S. Mail, the address is:

James Shields

P.O. Box 31926

Seattle, WA  98103-1926

You can register this program by sending $5 and your address.  CompuServe members may register by sending $3 and their account number (the registered version will be E-mailed to you).  CompuServe members may also register this package by going to the SWREG forum.  INICON is registered there.  INICON's registration ID number is 833.

(C) Copyright 1992-1993 by James Shields