我一般会在生成的文件后增加这样一段,能不能直接放到里面去?
initialization IniOptions := TIniOptions.Create; AppPath := ExtractFilePath(Application.Exename); IniOptions.LoadFromFile(AppPath + ChangeFileExt(ExtractFileName(Application.ExeName), '.ini')); finalization IniOptions.SaveToFile(AppPath + ChangeFileExt(ExtractFileName(Application.ExeName), '.ini')); IniOptions.Free; |
加载和存还是留给操作者自己控制吧,万一他不想结束时自动存呢。