Results 1 to 2 of 2

Thread: Change username and password

  1. #1

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544

    Post

    Hi!
    I have just maked a program
    with password protection, but
    the only password that works with
    program is the one i have "set" .
    How can i make the user change the
    Username and Password??

    I'm using the following code:

    Private Sub Command1_Click()
    Dim Login As Integer
    If WRusername.Text = "Licensed" And WRpassword.Text = "ccwr" Then
    Unload Me
    WinRestrict.Show
    Else
    Login = MsgBox("Incorrect login!!", vbCritical)
    WRusername.Text = ""
    WRpassword.Text = ""
    GoTo login2
    End If
    login2:



    End Sub

    WRusername & WRpassword are text fields (Text1)

    Yours Sincierly

    Cybercarsten

  2. #2
    Hyperactive Member Steve Stunning's Avatar
    Join Date
    Jul 1999
    Location
    Fairfax, Virginia
    Posts
    314

    Post


    Private Sub Command_Click()

    ' Create a new Command Button, and two text boxes where the new name and password can be entered. When they click the new Command button, it will make the changes and load in the new name and password new time they try try to log on.
    ' This name and password are NOT hidden in the registry but you can scramble them to make it harder to figure out.


    SaveSetting App.Title, "Settings", "User Name", TextNewName.Text

    SaveSetting App.Title, "Settings", "Password", TextNewPassword.Text

    end sub

    Private Sub Command1_Click()
    Dim Login As Integer


    username = GetSetting(app.title, "Settings", "User Name", "Licensed")

    password = GetSetting(app.title, "Settings", "Password", "ccwr")

    If WRusername.Text = username And WRpassword.Text = Password Then
    Unload Me
    WinRestrict.Show
    Else
    Login = MsgBox("Incorrect login!!", vbCritical)
    WRusername.Text = ""
    WRpassword.Text = ""
    GoTo login2
    End If
    login2:


    End Sub

    WRusername & WRpassword are text fields (Text1)


    This is just something quick and I hope it help you out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width