Results 1 to 2 of 2

Thread: Passwords

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 1999
    Posts
    65

    Post

    Can Someone Please Tell Me How To Password Protect A Program You Make By Using A Text Box?

    Thanx

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

    Post

    for a static (unchanging) password, simply test the text box.

    If Text1.Text = "Password" Then
    It's all good.
    Else
    End, get out of the program, whatever.
    End If

    If you want a dynamic (user-defined) one, then you probably want to make a separate file. You can open that file and put in the user defined password and use that open file to test the password.

    Text1.Text = real password
    Text2.Text = what user types in

    Open "c:\something.txt" for Random as #1
    Password = Text1.Text
    Put #1,1,Password
    Close #1

    (that puts the password in the file)

    Open "C:\something.txt" for Random as #1
    Get #1,1,Password
    If Text2.Text = Password Then
    La dee da, it's all good.
    Else
    Get out of here
    End If

    (that checks the password)

    I'm not sure if this is perfect because I haven't checked it, but it should work. Tweak it however you need.

    Good luck,
    bob

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