Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 13th, 2005, 8:32 AM   #1
zorin
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 218
Rep Power: 4 zorin is on a distinguished road
Smile password

Hi people ive just started learning VB and ive got a problem
Does anyone know the code for creating a password
zorin is offline   Reply With Quote
Old May 13th, 2005, 9:52 AM   #2
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
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!
Pizentios is offline   Reply With Quote
Old May 13th, 2005, 10:08 AM   #3
zorin
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 218
Rep Power: 4 zorin is on a distinguished road
do the loops and arrays come in the VB6 pakage ?

thanks for the help
zorin is offline   Reply With Quote
Old May 13th, 2005, 10:14 AM   #4
Cipher
Hobbyist Programmer
 
Cipher's Avatar
 
Join Date: Feb 2005
Location: /home/cipher
Posts: 123
Rep Power: 4 Cipher is on a distinguished road
Send a message via AIM to Cipher Send a message via MSN to Cipher
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....
Cipher is offline   Reply With Quote
Old May 13th, 2005, 10:24 AM   #5
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Here's a example of a for loop:

for x=0 to 9 step 1
            'do something that you want done ten times.
Next x

for 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!
Pizentios is offline   Reply With Quote
Old May 13th, 2005, 10:30 AM   #6
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
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!
Pizentios is offline   Reply With Quote
Old May 13th, 2005, 10:33 AM   #7
Cipher
Hobbyist Programmer
 
Cipher's Avatar
 
Join Date: Feb 2005
Location: /home/cipher
Posts: 123
Rep Power: 4 Cipher is on a distinguished road
Send a message via AIM to Cipher Send a message via MSN to Cipher
Oops, I probably should've given an example...Xd
__________________
And there was much rejoicing... Yay....
Cipher is offline   Reply With Quote
Old May 14th, 2005, 8:12 PM   #8
lostcauz
Hobbyist Programmer
 
Join Date: Nov 2004
Location: 1691 miles East of L.A.
Posts: 159
Rep Power: 5 lostcauz is on a distinguished road
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!
lostcauz is offline   Reply With Quote
Old May 14th, 2005, 10:56 PM   #9
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Quote:
Originally Posted by lostcauz
step 1 isn't required. step is used for incrementing by numbers other than one, ie step -1 or step 3.
Well yes, but I think Piz was demonstrating the full For loop syntax. Valid point though.
Rory is offline   Reply With Quote
Old May 15th, 2005, 4:32 AM   #10
lostcauz
Hobbyist Programmer
 
Join Date: Nov 2004
Location: 1691 miles East of L.A.
Posts: 159
Rep Power: 5 lostcauz is on a distinguished road
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!
lostcauz is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC