|
-
Nov 13th, 1999, 03:58 AM
#1
Thread Starter
New Member
Does Anyone Have A Code For VB 3.0 so that when you go into it it asks for a password in an input box????
-
Nov 13th, 1999, 03:39 PM
#2
Hyperactive Member
-
Dec 26th, 2004, 11:52 PM
#3
Member
Re: Passwords
If you mean 'go into program' then the code is here,
visual basic code:
Sub Form1_OnLoad()
Dim Password
Password=Inputbox("Enter password to continue.","Password")
Do Until Password="hi"
MsgBox"Wrong! Please try again.",48,"Password"
Password=Inputbox("Enter password to continue.","Password")
Loop
MsgBox"Correct!",64,"Password"
End Sub
The 'Form1' is the name of the form, the password that is set is: 'hi' you can change that by the 'Do until password="hi"' the only problem with that is when you type the password in, theres no way that I know of to make it show up as stars. Well hope that helped
-
Dec 27th, 2004, 12:10 AM
#4
Re: Passwords
if you use a textbox for the input, you can use a mask for stars. Just place a "*" in PasswordChar.
-
Dec 27th, 2004, 02:38 AM
#5
Frenzied Member
Re: Passwords
i'd advise against looping until the password is correct unless you allow the user to exit the loop by pressing cancel
-
Dec 27th, 2004, 02:45 AM
#6
Re: Passwords
I had a management password in my old app, that I'm re-writing. I haven't decided whether or not to implement one in this version. I hard-coded the last one, and don't want to in this version. Does anybody hard code a master password into their programs? I've known mainframes that have dual-passwords for everything, as well as passwords that never change. I just wonder how everybody else does it?
-
Dec 27th, 2004, 05:28 AM
#7
Frenzied Member
Re: Passwords
Used to hard code them, then I came up with a routine that works needing a new password every day. It was linked to the name of the user and the date (of course). Problem was, I had to fire up a second program to calculate the password of the day when I was on site.
That used to be an annoyance so I ended up hard coding a 20 digit password based on the first character of each of the words of an obscure nursery rhyme I learned (and never forgot) as a kid.
Works like a charm, and I defy anyone looking over my shoulder to copy it when I am on site.
Moral of the story - A system can have as fancy a password as you like but I will bet there is always a back door.
.
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
|