![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Apr 2005
Posts: 218
Rep Power: 4
![]() |
Hi people ive just started learning VB and ive got a problem
Does anyone know the code for creating a password |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() |
use loops and arrays.
give it a try yourself man, that's how you learn a language.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Apr 2005
Posts: 218
Rep Power: 4
![]() |
do the loops and arrays come in the VB6 pakage ?
thanks for the help |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
|
No. You have to code your own loops. Try the FOR...NEXT loop. You can find it on MSDN. Or you can find a VB tutorial on google.
__________________
And there was much rejoicing... Yay.... |
|
|
|
|
|
#5 |
|
Programming Guru
![]() ![]() |
Here's a example of a for loop:
for x=0 to 9 step 1
'do something that you want done ten times.
Next xfor more info, just search google for "visual basic 6 for loop", or something along those lines.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() |
Also you'll want to look into the rnd function.
http://msdn.microsoft.com/library/de...LROverview.asp for more details. you'll also only need one loop, that runs as many times as the length of password that you want to generate. inside said loop you'll have the rnd function creating random numbers between a certain range, which then you can pass to a array containing 26 letters, or even 52 (Uppercase and Lowercase letters). you could also make it a better password by using letters and text characters (like #@$%).
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#7 |
|
Hobbyist Programmer
|
Oops, I probably should've given an example...Xd
__________________
And there was much rejoicing... Yay.... |
|
|
|
|
|
#8 |
|
Hobbyist Programmer
Join Date: Nov 2004
Location: 1691 miles East of L.A.
Posts: 159
Rep Power: 4
![]() |
step 1 isn't required. step is used for incrementing by numbers other than one, ie step -1 or step 3.
__________________
-- lostcauz Stepped in what?... Behind whose barn?... I didn't even know they had a cow! |
|
|
|
|
|
#9 | |
|
Expert Programmer
|
Quote:
|
|
|
|
|
|
|
#10 |
|
Hobbyist Programmer
Join Date: Nov 2004
Location: 1691 miles East of L.A.
Posts: 159
Rep Power: 4
![]() |
The 'full For loop syntax'?
Step is an optional keyword specifying the increment of the counter. Step defaults to 1. Programmers typically use the loop as I stated for increments of 1. ![]()
__________________
-- lostcauz Stepped in what?... Behind whose barn?... I didn't even know they had a cow! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|