hey, if its an .ini file, its much simpler than that.
//---------------------------------------------------------------------------
#include <vcl.h>
#include <IniFiles.hpp> // <-be sure to include this!!
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
TIniFile *ini; //initialize .ini file
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
ini = new TIniFile (ChangeFileExt( "TestCheck", ".INI" ) );
if (ini->ReadBool ("CheckBox1", "Checked", false)==false)
CheckBox1->Checked=false;
else
CheckBox1->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::CheckBox1Click(TObject *Sender)
{
if (CheckBox1->Checked==true)
{
ini->WriteBool ("CheckBox1", "checked", true);
}
else
{
ini->WriteBool ("CheckBox1", "checked", false);
}
}
//---------------------------------------------------------------------------
you can also read strings, write strings, experiment, just type in ini-> and c what pops up. Cyprus