如何判断Ini文件中Section的个数 内容同上,请各位高手帮忙 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 #include <Inifiles.hpp>void __fastcall TForm1::FormCreate(TObject *Sender){ TIniFile* pif = new TIniFile("WIN.INI"); pif->ReadSections(ListBox1->Items); pif->ReadSection("Ports",ListBox2->Items); pif->ReadSectionValues("Ports",ListBox3->Items); delete pif; int count = ListBox1-Items->Count;} var MyIni: TIniFile; StringList: TStringList;begin MyIni := TIniFile.Create('C:\WINNT\system.ini'); StringList := TStringList.Create; MyIni.ReadSections(StringList); ShowMessage(IntToStr(StringList.Count)); // Section 总数 StringList.Free; MyIni.Free;end; 子窗体如何返回参数给主窗体 求助各位大大了~~ 我想在DBGrid的CellClick事件里面把当前行的所有数据打印出来,该怎么做呢? 有哪位好心的大哥帮帮我这个菜鸟.很简单的一个问题. SQl 是否支持多个字段作为关键字求和? 如按 Feild1+Feild1 作为关键字求和? 关于SQL SERVER 的问题 请问大虾们,判断数字、字符串、小数那几个delphi函数是什么? 各位兄弟,怎样制作特效窗口? ADO的BUG的问题 怎么让MEMO动态改变大小??? 怎么在notebook里边指定一页上动态创建一下button? 怎样为ListBox增加OnChange事件!?请明确指出!
void __fastcall TForm1::FormCreate(TObject *Sender){
TIniFile* pif = new TIniFile("WIN.INI");
pif->ReadSections(ListBox1->Items);
pif->ReadSection("Ports",ListBox2->Items);
pif->ReadSectionValues("Ports",ListBox3->Items);
delete pif; int count = ListBox1-Items->Count;
}
MyIni: TIniFile;
StringList: TStringList;
begin
MyIni := TIniFile.Create('C:\WINNT\system.ini');
StringList := TStringList.Create;
MyIni.ReadSections(StringList);
ShowMessage(IntToStr(StringList.Count)); // Section 总数
StringList.Free;
MyIni.Free;
end;