Results 1 to 2 of 2

Thread: 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 made a restriction program.
    The program is passwordprotected,
    but there is only one user.
    I want the user to change the password
    at any time.
    I use the following code:

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

    How can i make a button that can use anoter password
    Can i use the registry???

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305

    Post

    You could make an obscure file that stores the password, then when you change the password it changes the file. To check the password, you simply get the word from the file and if they match, it's all good. Something like:

    to place the password-
    Dim password
    Open "C:\password.bla" for Random As #1
    Text1.Text = password
    Put #1,1,password
    Close #1

    to check the password-
    Dim password
    Open "C:\password.bla" for Random As #1
    Get #1,1,password
    If Text2.Text = password Then
    'It's all good
    Else
    MsgBox(whatever)
    End if
    Close #1

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