| Mirage Source http://miragesource.net/forums/ |
|
| Simple Password Generator http://miragesource.net/forums/viewtopic.php?f=210&t=4145 |
Page 1 of 1 |
| Author: | Jack [ Tue Aug 12, 2008 1:48 am ] |
| Post subject: | Simple Password Generator |
0/5 SUPER EASY Right, Well this is my 1st proper coded by me tutorial. Adding The generator to New account Go to FrmNewAccount add a a label and a text box below password and then call the label lblGen and call the textbox txtGen ------------------- Example Password| :______:<-----text box Generate| :______: ------------------- Right now right click and add this code to the label Code: Private Sub lblGen_Click() txtGen = GenerateCode() End Sub now you can place this next part of the code anywhere I think, I placed it below Sub CheckMovement() add the code below Sub CheckMovement() Code: Public Function GenerateCode() Dim strinputstring As String Dim intLength As String Dim IntNameLength As Long Dim strname As String Dim Intstep As Integer Dim intRnd As Integer strinputstring = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" intLength = Len(strinputstring) IntNameLength = 5 strname = "" For Intstep = 1 To IntNameLength intRnd = Int((intLength * Rnd) + 1) strname = strname & Mid(strinputstring, intRnd, 1) Next GenerateCode = strname End Function You can also add numbers to it, add 0123456789 to here strinputstring = " so it would be strinputstring = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" You can also put the code under lblConnect_click() in the Forms code for FrmNewAccount and then change the Public function to Private function Any questions let me know ~Jack =) Version used MS3 |
|
| Author: | jsventor [ Tue Aug 12, 2008 1:52 am ] |
| Post subject: | Re: Simple Password Generator |
Whoa I really like that... |
|
| Author: | Jack [ Tue Aug 12, 2008 1:53 am ] |
| Post subject: | Re: Simple Password Generator |
=) thanks, Robin told me to mess around with Mirage so I did and came up with that, hope you all like. |
|
| Author: | Robin [ Tue Aug 12, 2008 11:13 am ] |
| Post subject: | Re: Simple Password Generator |
Glad to see you're doing something useful. And you learned how to use for...next loops |
|
| Author: | Jack [ Tue Aug 12, 2008 11:29 am ] |
| Post subject: | Re: Simple Password Generator |
Thanks Robin.I do take your advice =) |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|