|
|
|
|
![]() ![]() |
Apr 8 2006, 06:15 PM
Post
#1
|
|
|
Newbie [Level 3] ![]() ![]() ![]() Group: Members Posts: 48 Joined: 12-March 06 Member No.: 19,909 |
![]() 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: CODE [b]procedure[/b] LoadPasswordFile; and in this code there is a procedure called: CODE [b]procedure[/b] DisplayRecord; and the code for that is as follows: CODE // 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: CODE / 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! |
|
|
|
Apr 11 2006, 06:18 AM
Post
#2
|
|
|
Advanced Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 130 Joined: 21-December 05 Member No.: 15,990 |
QUOTE Delphi Password Loading To Text Box For showing password at TextBox you should use * - it's "password char" field in object inspector. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 25th July 2008 - 08:08 PM |