| | |
the form that wont die...
![]() |
•
•
Join Date: Nov 2007
Posts: 100
Reputation:
Solved Threads: 2
ok i have been busy redoing a lot of the code....
the form intermittently does the aforementioned initial problem now. VERY strange indeed.
I will attempt to redo the entire code for the form that is looping for no apparent reason in the next day or two.
Now to answer a few questions....
the "1" was used before when I was actually looking to see if a file that held the encrypted password was there or not. If it wasnt there, then "goto 1," which ended the procedure. But now I'm not using a file to store the encrypted password. I am writing it to the registry instead (also encrypted). Much better this way imho.
the Pause in the code was (and still is used) if a password has been previously entered in to load the next form. The reason i used the Pause was because the GUI looks kinda cool and it allowed for a little time for the user to see what is actually happening. The Pause is now set at 2 instead of 1.5.
Also, the Pause is a valid command since I have code to actually count (in seconds instead of milliseconds) in a separate procedure/subroutine.
Lastly, I have tried an 'unload form' already to no avail because as it loops, it simply reopens the form that was unloaded. I tried that before i posted this problem here. Good suggestion however.
Hope that clears some things up. The problem is still not solved though. :\
Thanks for the help very much. Im sure eventually it will get it figured out. Hopefully sooner than later.
the form intermittently does the aforementioned initial problem now. VERY strange indeed.
I will attempt to redo the entire code for the form that is looping for no apparent reason in the next day or two.
Now to answer a few questions....
the "1" was used before when I was actually looking to see if a file that held the encrypted password was there or not. If it wasnt there, then "goto 1," which ended the procedure. But now I'm not using a file to store the encrypted password. I am writing it to the registry instead (also encrypted). Much better this way imho.
the Pause in the code was (and still is used) if a password has been previously entered in to load the next form. The reason i used the Pause was because the GUI looks kinda cool and it allowed for a little time for the user to see what is actually happening. The Pause is now set at 2 instead of 1.5.
Also, the Pause is a valid command since I have code to actually count (in seconds instead of milliseconds) in a separate procedure/subroutine.
Lastly, I have tried an 'unload form' already to no avail because as it loops, it simply reopens the form that was unloaded. I tried that before i posted this problem here. Good suggestion however.

Hope that clears some things up. The problem is still not solved though. :\
Thanks for the help very much. Im sure eventually it will get it figured out. Hopefully sooner than later.
Last edited by squidd; Nov 21st, 2008 at 1:29 am.
•
•
Join Date: Nov 2007
Posts: 100
Reputation:
Solved Threads: 2
Good thinking.
Just to let you know... I tried to completely redo the code and that dide work either. Since there is 3 different if then statements, and it DOES repeat 3 times, I started thinking that the number of IF-Then statements is the reason for the number of repeats. They are all inside one subroutine/procedure.
The problem is, I cant really simplify it. I suppose i could use a "Case" statement instead, but I haven't ever seen a case argument that has multiple lines after it in any examples of source that i have looked at. Logically, it "could" work. But, I just dont know about "Case" coding that well to say for sure right now.
I will go on the premise that because in this one sub/procedure that there are 3 if..then statements. It is the only thing that makes sense at the moment for the number of repeats I am getting. Where in the heck are the experienced coders for VB? I am pretty sure that a several of them, at the very least, have enough knowledge to easily fix this little problem.
Patiently awaiting a reason why this thing repeats when it swhouldnt.
Just to let you know... I tried to completely redo the code and that dide work either. Since there is 3 different if then statements, and it DOES repeat 3 times, I started thinking that the number of IF-Then statements is the reason for the number of repeats. They are all inside one subroutine/procedure.
The problem is, I cant really simplify it. I suppose i could use a "Case" statement instead, but I haven't ever seen a case argument that has multiple lines after it in any examples of source that i have looked at. Logically, it "could" work. But, I just dont know about "Case" coding that well to say for sure right now.
I will go on the premise that because in this one sub/procedure that there are 3 if..then statements. It is the only thing that makes sense at the moment for the number of repeats I am getting. Where in the heck are the experienced coders for VB? I am pretty sure that a several of them, at the very least, have enough knowledge to easily fix this little problem.

Patiently awaiting a reason why this thing repeats when it swhouldnt.
•
•
•
•
I'm assuming that the program is being told to wait 1.5 seconds before continuing. Is 'pause' not a valid command?
It makes sense 'logically'...but if it's not a command - it's not a command.
funny, i've never used form.visible = true / false to show or hide forms... always just used .show or .hide... didn't even know it worked until now... well there's my new thing for the day

[edit]ok... so i probably shouldn't be posting at 6:30 am with no sleep... sorry, didn't notice the second page
[/edit] Last edited by kain_mcbride; Nov 22nd, 2008 at 7:37 am. Reason: ... unseen preceeding posting...
... there is no bug that enough coffee cannot fix...
•
•
Join Date: Nov 2007
Posts: 100
Reputation:
Solved Threads: 2
the code for pause goes as follows and I am fairly certain that it is not part of the problem:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Sub pause(interval) Current = Timer Do While Timer - Current < Val(interval) DoEvents Loop End Sub
looking at that, wouldn't think so...
alright, unrelated to the form not disapearing... i have a question about your code...
what happens if someone uses presetpass as their password? (or some random combination of alphanumeric characters that happens to contain the string reset in the somewhere inside of it..?
as a note... with the code provided; i can see no reason that the form would keep coming back...
alright, unrelated to the form not disapearing... i have a question about your code...
what happens if someone uses presetpass as their password? (or some random combination of alphanumeric characters that happens to contain the string reset in the somewhere inside of it..?
as a note... with the code provided; i can see no reason that the form would keep coming back...
... there is no bug that enough coffee cannot fix...
•
•
Join Date: Nov 2007
Posts: 100
Reputation:
Solved Threads: 2
I'm not sure I understand what you mean. But as far as the password goes, if there is no password at all, it asks if you want to make one. If not, then the password form does not come up. If you do want to. then it does.
After that, it saves the password to the registry (encoded). There is no preset pass to check. It won't look for a password until one has been created, but if it has been saved already in a prior running of the program, then the program checks for the password.
If it is there, the program will start. If not, then it wont. Simple as that.
I dont really understand the question. I hope this answers it.
After that, it saves the password to the registry (encoded). There is no preset pass to check. It won't look for a password until one has been created, but if it has been saved already in a prior running of the program, then the program checks for the password.
If it is there, the program will start. If not, then it wont. Simple as that.
I dont really understand the question. I hope this answers it.
was just wondering about the check for reset... instr will check within String1 for an instance of String2, string2 being reset, if String1 is set to anything including reset, it'll come back as true...
so reset will come back as saying, yes... it says reset...
preset will come back as saying that it says reset...
and 324resetas351 will come back as saying that it says reset...
might want to use
better yet, might want to use a string of charaters they can't use as a password... for instance
stReset = chr$(13) & chr$(13) & chr$(13)
so reset will come back as saying, yes... it says reset...
preset will come back as saying that it says reset...
and 324resetas351 will come back as saying that it says reset...
might want to use
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
if pass <> "reset" then 'your valid password code elseif pass = "reset" then 'your reset password code end if
better yet, might want to use a string of charaters they can't use as a password... for instance
stReset = chr$(13) & chr$(13) & chr$(13)
Last edited by kain_mcbride; Nov 23rd, 2008 at 1:27 am. Reason: a different method..?
... there is no bug that enough coffee cannot fix...
•
•
Join Date: Nov 2007
Posts: 100
Reputation:
Solved Threads: 2
That particular portion of code has nothing to do with a password in the way you are describing at all. That piece of code has to do with a database check for something else entirely. And it doesnt "reset" to the best of my knowledge as it is pulling an HDD volume ID.
However, that information will certainly prove to be quite valuable in the future. Thank you very much for it.
There are many things happening in this particular "sub." I am beginning to think that it is repeating itself due to the placement of certain lines of code OR how many times i run the code consecutively without restarting VB6. Because it is an intermittent problem sometimes as well. It either doesn't happen at all, or repeats once after the initial run, or twice after the initial run. It is REALLY frustrating. Crazyness for sure.
Even the compiled code will do the same "redo" even when it didn't in the testing phase of the code. So whatever is causing it is not fixed for sure. But, I just recently made another chg to the code (tonight) and I haven't seen it happen at all lately. That means exactly nothing though because i have had that happen before since posting this problem only to see the "redo" return.
As Always,
Thank you for the help and comments. It is certainly appreciated.
However, that information will certainly prove to be quite valuable in the future. Thank you very much for it.

There are many things happening in this particular "sub." I am beginning to think that it is repeating itself due to the placement of certain lines of code OR how many times i run the code consecutively without restarting VB6. Because it is an intermittent problem sometimes as well. It either doesn't happen at all, or repeats once after the initial run, or twice after the initial run. It is REALLY frustrating. Crazyness for sure.
Even the compiled code will do the same "redo" even when it didn't in the testing phase of the code. So whatever is causing it is not fixed for sure. But, I just recently made another chg to the code (tonight) and I haven't seen it happen at all lately. That means exactly nothing though because i have had that happen before since posting this problem only to see the "redo" return.

As Always,
Thank you for the help and comments. It is certainly appreciated.
Last edited by squidd; Nov 23rd, 2008 at 3:14 am.
![]() |
Similar Threads
- Tutorial: Understanding ASP classes (ASP)
- Help me please. (PHP)
- Please help i have issues with my sregister form or server. (PHP)
- your basic calender (JavaScript / DHTML / AJAX)
- get html element value using php (PHP)
- limiting account names (PHP)
- php wont submit data into the database (PHP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: using of Crviewer component.......
- Next Thread: help me to fix my counter
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






