It is a little difficult to understand what exactly you are asking, but if you are asking how to save and load a configuration containing a user name and a password to a simple text file, you can use this code:
TYPE
TConfiguration = RECORD
UserName,Password : STRING
END;
FUNCTION ReadConfig(CONST FileName : STRING) : TConfiguration;
VAR
TXT : TextFile;
BEGIN
AssignFile(TXT,FileName); RESET(TXT);
TRY
READLN(TXT,Result.UserName);
READLN(TXT,Result.Password)
FINALLY
CloseFile(TXT)
END
END;
PROCEDURE WriteConfig(CONST FileName : STRING ; CONST Config : TConfiguration);
VAR
TXT : TextFile;
BEGIN
AssignFile(TXT,FileName); REWRITE(TXT);
TRY
WRITELN(TXT,Config.UserName);
WRITELN(TXT,Config.Password)
FINALLY
CloseFile(TXT)
END
END;
Use it as this when saving:
VAR Config : TConfiguration;
...
Config.UserName:=editbox1.Text;
Config.Password:=editbox2.Text;
WriteConfig(FileName,Config);
and like this to reload:
VAR Config : TConfiguraion;
...
Config:=ReadConfiguration(FileName);
editbox1.Text:=Config.UserName;
editbox2.Text:=Config.Password;
If this is not what you want, you'll have to elaborate a bit...