调用ini文件 调用记录的用户名
uses
.....inifiles;
procedure TLoginForm.FormCreate(Sender: TObject);
var
USERINI:Tinifile;
logoPicture,USER : String;
begin
USERINI := TiniFile.Create(Extractfilepath(application.exename)+'USER.ini');
USER:=USERINI.ReadString('Interface','USER','');
IF USER<>'' then
Begin
try
EdUser.Text :=USER;
except
end;
end;
USERINI.Free;
end;
自动记录用户名:
procedure TLoginForm.BtnYesClick(Sender: TObject);
var
USERINI:Tinifile;
USER :string;
begin
USERINI := TiniFile.Create(Extractfilepath(application.exename)+'USER.ini');
userini.WriteString('interface','user',EdUser.Text);
end;
提交确认的时候加上这个就能写入ini文件中了