Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Spyware and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Important Announcement: We have two terrific contests running on the site that I wanted all our members and guests to know about.

The first contest is the HP Magic Giveaway, which is underway as of November 28th. More information can be found at this topic, which will be updated very soon with further information.

The second contests, is for the chance to win two Seagate FreeAgent external hard drives. More information about this contest can be found here.

These are both amazing contests and I suggest everyone submit an entry for them.

- BleepingComputer Management
 
Reply to this topicStart new topic
> Help ples 2nd time, if der is anyone out der...
heltune
post Jul 10 2005, 02:12 AM
Post #1


Member
**

Group: Members
Posts: 57
Joined: 28-April 05
Member No.: 18,392



hi its me again.... it seems my first topic hasn't been answered yet but its okey nevertheless...
i have only one qwestion...

HOW DO YOU MAKE A LOOP THAT WILL COUNT YOUR CHANCE... LET US SAY IN PASSWORD CHECKS... IM MAKING A PASSWORD BOX WER A PERSON CAN PUT DER PASSWORD BUT ONLY 3 TRIES MUST BE MADE... I WAS ABLE TO LOOP AND CODE ONE BUT IT SEEMS IT DIDNT MAKE OR THE WAY IT WORKS IS NOT WAT I WANT... IT KEEPS LOOPING UNTIL THE DESIRED NUMBER IS OBTAINED LET US SAY 3... WHEN YOU CLICK OK ON THE mSGBOX IT LOOPS AND THEN ENDS AT THE THIRD MSGBOX... IT DOES NOT GIVE YOU THE OPPORTUNITY TO PUT YOUR PASSWORD AGAIN ON THE TEXT PASSWORD BOX... IT LOOPS AND ENDS...PLES HELP HOW TO MAKE ONE...

THANK YOU VERY MUCH.PLEASE
cold.gif
Go to the top of the page
 
+Quote Post
jgweed
post Jul 10 2005, 05:27 AM
Post #2


Forum Addict
******

Group: Global Moderator
Posts: 20,642
Joined: 11-April 04
From: Chicago, Il.
Member No.: 113



What is the program you are using to do this? is it VB? Can you copy the pertinent lines of code for others to look at?
Regards,
John

This post has been edited by jgweed: Jul 10 2005, 05:29 AM


--------------------
Whereof one cannot speak, thereof one should be silent.
Go to the top of the page
 
+Quote Post
groovicus
post Jul 10 2005, 11:05 AM
Post #3


Hail Groovicus!
******

Group: Site Admin
Posts: 6,265
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



In PsuedoCode:
CODE
int Sentinel = 0
boolean validPassword = true

while sentinel is less than 3, check the password
    if password is valid
        then break out of loop
        set sentinel = to 0
    if password is invalid
         increase sentinel by one

if sentinel = 3
   validPasword = false

if not validPassword is false
   end program


And if you wouldn't mind, please don't type in all capital letters.

This post has been edited by groovicus: Jul 10 2005, 11:14 AM


--------------------
Go to the top of the page
 
+Quote Post
heltune
post Jul 10 2005, 12:37 PM
Post #4


Member
**

Group: Members
Posts: 57
Joined: 28-April 05
Member No.: 18,392



sorry for the caps lock thing... my apology...
is this code for Visual C++? if it is ill try to test it in VB6.0. i was referring to the VB6.0 code... sorry for the incomplete info.

thank you aal of you for responding...
thumbup.gif

thanks for the idea.
Go to the top of the page
 
+Quote Post
groovicus
post Jul 10 2005, 01:39 PM
Post #5


Hail Groovicus!
******

Group: Site Admin
Posts: 6,265
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



That is just psuedo code..it can be translated into any language. I am just showing you one way that it can be done. I could show you in Java, but that wouldn't do you any good. It is just a simple while loop, followed by a couple conditional loops once the while loop is finished.

How do you declare an int in VB? Do you know how to do a while loop in VB? Do you know how to do an if loop? Then do you know how to make a comaprison? There are probably a hundred different ways to code this.


--------------------
Go to the top of the page
 
+Quote Post
heltune
post Jul 10 2005, 05:30 PM
Post #6


Member
**

Group: Members
Posts: 57
Joined: 28-April 05
Member No.: 18,392



thanks for the thought...
ill try to code it in VB6.0

it helped me understand i hope ill get it right... if you can suggest how to code it, it will further help me its your call...
again thanks very much...
Go to the top of the page
 
+Quote Post
groovicus
post Jul 10 2005, 05:39 PM
Post #7


Hail Groovicus!
******

Group: Site Admin
Posts: 6,265
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



I don't use VB, so I am not familiar with the syntax.


--------------------
Go to the top of the page
 
+Quote Post
heltune
post Jul 10 2005, 08:10 PM
Post #8


Member
**

Group: Members
Posts: 57
Joined: 28-April 05
Member No.: 18,392



Private Sub cmdPass_Click()
If password.Text = "secret" Then
Database.Hide
Database2.Show
Timer1.Enabled = False
Else
password.Text = ""
password.SetFocus
MsgBox "fdfgfg", 16, "ffdfdfd1"
End If
End Sub

this is my code for my Vb6.0

it does work well but its limited, i want it to have a password lock that would give the user 3 tries to put their password and then after the third try it will close or stop them from entering... but of course after each tries there will be warning messages tthat would let the user know how many times he/she had put the password... i cant do it... it keeps onlooping until the desired number of n or tries is obtained... sori...
ples help me...
anyways thenks to you... besides learning Vb6.0 i am also doing a lesson on C++ it help me with that syntax thenks...
Go to the top of the page
 
+Quote Post
heltune
post Jul 10 2005, 08:11 PM
Post #9


Member
**

Group: Members
Posts: 57
Joined: 28-April 05
Member No.: 18,392



tenks groovicius...
if you know Vb6.0 ples spare a time teaching me ...
ten you...
Go to the top of the page
 
+Quote Post
groovicus
post Jul 10 2005, 08:21 PM
Post #10


Hail Groovicus!
******

Group: Site Admin
Posts: 6,265
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



I don't know VB.. this is just simple procedural programming.

If you want a user to know how many time they have tried to enter their password, then all you need to do is use your counter, which already holds the number you want to use anyway.


--------------------
Go to the top of the page
 
+Quote Post
heltune
post Jul 11 2005, 11:44 AM
Post #11


Member
**

Group: Members
Posts: 57
Joined: 28-April 05
Member No.: 18,392



thanks groovicious...its ok.
cheff.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 4th December 2008 - 01:55 PM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.