
As you can see from this image, I have a listbox which loads in the usernames from a .DAT file, which has been encrypted and decrypted using the parsestring function.
However, I cannot get the type of user (e.g. Administrator, Supervisor, Guest) to load into the Combobox below, and the password of the user selected to load into the password Textbox. I have a procedure called:
[b]procedure[/b] LoadPasswordFile;
and in this code there is a procedure called:
[b]procedure[/b] DisplayRecord;and the code for that is as follows:
// Display the record. FrmOptions.LstUsers.ItemIndex := StrToInt (s_user[i_currrec]); FrmOptions.CmbLoginType.ItemIndex := StrToInt (s_type[i_currrec]); FrmOptions.TxtPassword.Text := s_password[i_currrec];
The code for loading the password file is below also if that helps:
/ Start to read the records into the arrays. while not eof(f_handle) do begin Readln(f_handle, s_inputtext); // Check that the line contains data. if s_inputtext > '' then begin parsestring(s_inputtext, temp_string); s_user[i_norecords] := decrypt(temp_string, length(temp_string)); FrmOptions.LstUsers.Items.Add(s_user[i_norecords]); parsestring(s_inputtext, temp_string); s_type[i_norecords] := decrypt(temp_string, length(temp_string)); s_password[i_norecords] := Decrypt(Copy(s_inputtext, 2, Length(s_inputtext) - 2), Length(Copy(s_inputtext, 2, Length(s_inputtext) - 2))); end;
Thanks a lot if anyone can help me!














