Results 1 to 7 of 7

Thread: Passwords

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    Launceston, Tasmania, Australia
    Posts
    6

    Post

    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????

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Post

    When you go into what???

  3. #3
    Member MendyGreen's Avatar
    Join Date
    Dec 2004
    Location
    Baltimore, MD
    Posts
    56

    Cool 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

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Passwords

    if you use a textbox for the input, you can use a mask for stars. Just place a "*" in PasswordChar.

  5. #5
    Frenzied Member dis1411's Avatar
    Join Date
    Mar 2001
    Posts
    1,048

    Re: Passwords

    i'd advise against looping until the password is correct unless you allow the user to exit the loop by pressing cancel

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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?

  7. #7
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    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.

    .
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

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