INI Files

GrenadeFX

Member
Joined
Jan 20, 2005
Messages
21
Location
Australia
i looked at the fprum but is there a way to red INI files like delphi does?
Id like to know
i dont want it like normal txt files but as ini.............im sure you know what i mean
 
GrenadeFX said:
i looked at the fprum but is there a way to red INI files like delphi does?
Id like to know
i dont want it like normal txt files but as ini.............im sure you know what i mean

There is windows API for this, its ReadPrivateProfileString, WritePrivateProfileString, ReadPrivateProfileSection.
 
If I wanted to write under my program named prog1, to the settings section and set the windowstate key to 1 (meaning true) then it would be done like this.
[CS]
WritePrivateProfileString ("settings", "windowstate", "1", "C:\\myini.ini");
[/CS]
Reverse that for reading.

I also found this doing a search, you may find it helpful. Its an atatchemnt, I had to upload with .txt extension, but its C# code.
 

Attachments

Back
Top