|
-
Nov 28th, 1999, 05:42 AM
#1
Thread Starter
Lively Member
Can Someone Please Tell Me How To Password Protect A Program You Make By Using A Text Box?
Thanx
-
Nov 28th, 1999, 06:26 AM
#2
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|