Saturday, June 19, 2010

One more time... vb6 cash register program?

[ The problem is this: my prof said that we make a login program (which I%26#039;ve already finished), however, it will only let the user make 3 incorrect inputs... (the user can only input 3 incorrect password/username input). I used a 1D array in this one... I was just thinking, did the way that I used the array as the increment identifier wrong or not (or, is it okay for me to use an array instead of a simple counter?) ]



I%26#039;ve posted the earlier versions of this before, and here is the latest version (10.10.07):



http://www.destinyonlinev2.i8.com/vb6.ht...



and it would really be helpful if you guys helped me by testing this program (the cash register program for vb6), which you can find in this address:



http://www.destinyonlinev2.i8.com/cash_r...



%26gt;%26gt; which contains the EXE and the Dbase of the program... I%26#039;m not sure about this, but I think you need vb6 for this to work... -_- And suggestions and comments please!!



One more time... vb6 cash register program?signature loan





just declare your cnt variable globally and insert the 0 value on form load and when every time the user log incorrectly it will increment and not reset to zero it resets to zero because you declare the cnt = 0 inside the button so every time they press the button it resets to zero



hope this helps



http://joxtechnology.com/



One more time... vb6 cash register program?

loan



Was looking at your code....a 1-dimensional array is the same as just a regular variable so you shouldnt explicitly define it as a 1D array in code..just use it as a regular variable minus the array look to it...so in your case it should read %26quot;Dim cnt as Integer%26quot; (and modify all your references to cnt(1) to cnt).



And i am not sure if you have pre-defined rules set out by your prof but if u dnt then maybe modify the code so that you have 3 chances based on a username, but if the username %26quot;changes%26quot; in some way then the # of chances the user has is 3 again....It would make things even more interesting if say the user who typed a certain username and gave an incorrect password and then goes to another username but then goes back to the other username if your code can handle and keep track the # of times that was attempted for each user name...any username that finally reaches 3 failed attempts then kicks the user out (restart system).... This wouldnt be hard since you just need to have a redim 2D array that resizes and keeps track of each attempted username and the attempts made....

No comments:

Post a Comment

 


celebrate lent © 2008. Design by: Pocket Web Hosting