This enables me to have a checkbox functionality in the form which is a plus. Right I have changed my code a little so I have now got three strings with the different characters in, 1 for uppers, one for lowers and one for numbers. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub TextBox1_Enter(sender As Object, e As EventArgs) Handles TextBox1.Enter Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click TextBox1.Text =("Please enter a valid password length") StrName = strName & Mid(strInputString, intRnd, 1) If Integer.TryParse(TextBox1.Text, intNameLength) And intNameLength >= 6 And intNameLength <= 20 Then StrInputString = "1234567890ABCDEFGHIJKLMEOPQRSTUWXYZabcdefghijklmnopqrstuvwxyz" Private Function GenerateCode() As Object Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click ![]() Passwords must be between 6 and 20 characters in length. This doesn't sound very clean and I have been having problems doing this.Ĭan anyone help point me in the right direction or assist with the code below. ![]() Once it has one of each it will then generate the rest of the password using my code. I have had a play myself and I was going to have three strings, one with uppercase, one with lower case and a third with numbers. However how I have coded this it will generate a random combination which quite often results in one of the criteria being missed out. I would like each password it generates to have at least 1 number, uppercase and lowercase in it. I have come up with the below which works however its a bit crude with its password criteria. I have been tasked with creating a visual basic random password generator.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |