就是程序第一次运行的时候要用户输入数据,要将这些数据存储到ini文件中,第二次运行该程序的时候将这些数据从文件中读出,具体该怎样做/

解决方案 »

  1.   

    早说呀,函数
    function readinfofromsysini(thesection,thekeyname,thefilepath:string):string;
    var sysini:Tinifile;
    begin
    sysini:=Tinifile.create(thefilepath+'\XX.ini');
    result:=sysini.readstring(thesection,thekeyname,'');
    sysini.free;
    end;procedure writeinfotosysini(thesection,thekeyname,thefilepath,thevalue:string);
    var
    sysini:Tinifile;
    beign
    sysini:=Tinifile.create(thefilepath+'\xx.ini');
    sysini.writestring(thesection,thekeyname,thevalue);
    sysini.free;
    end;
    //说明:
    ini格式 :[insys]
    aaa=3
    //调用时thesection=‘insys’,thekeyname=‘aaa'
      

  2.   

    同意 zhangpeigao(zhangpeigao) 方法。