![]() |
|
#1
|
|||
|
|||
|
Can anybody help me to do this?
![]() Thx...gLes |
|
#2
|
|||
|
|||
|
You don't need any components, it's build-in Delphi!
all you need is to add in the 'USES' line the unit 'IniFiles' Here is an Example of using the INI files: Uses IniFiles; Var IniF:TIniFile; Procedure Demo; Begin IniF:=TIniFile.Create('Filename.ini'); IniF.WriteString('Section','Ident','Value'); IniF.WriteInteger('Section','IdentInt',100); IniF.WriteBool('Section','IdentBool',False); // in the ini file you'll see: // [Section] // Ident=Value // IdentInt=100 // IdentBool=False // and now let's read the ini file IniF.ReadString('Section','Ident','Default'); IniF.ReadInteger('Section','IdentInt',0); IniF.ReadBool('Section','IdentBool',True); // The third parameter is the default in case that // there is no value! IniF.Destroy; End; This demo seems to work just fine! and it's all include Delphi 4,5 (or maybe 3)! The Default location of the file is in your windows directory!!! (this is very good) unless you define it else! the only limitations is that the file must be less than 64K!!! don't ask me why... |
|
#3
|
|||
|
|||
|
Thx...
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|