How to make a simple Password protection for all.
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 'System & API - How to make a simple Password protection for all. 'Make a form with two text boxes and two command button. '1)cmdenter 2)cmdchange 3)txtpass 4)txtcheck Sub cmdchange_click() 'first password must be set the string in the txtpass is to be saved SaveSetting "pass", "Password", "user", txtpass.Text End Sub Sub form_load() 'load the password txtpass.Text = GetSetting("pass", "Password", "user", "") End Sub Sub cmdenter_click() 'check the password. If correct show another form If txtuser.Text = txtpass.Text Then Unload Me Load frm2 frm2.Show Else MsgBox ("Invalid Password") End If End Sub |