Hi all,
I’ve been having trouble getting a textbox to disappear after a predetermined period of time. Ultimately, it will not be a text box, but a combination of both a button and a flashing square that surrounds the button that will disappear. Basicly, the button is to close the form, and the flashing red square is to draw the users attention to the message that states that if you find yourself here by mistake, click the button and exit. I want the pair to time out after a few seconds if not clicked. It goes away if the user begins entering data where the curser is located. The text box is for testing purposes only.
The flashing of the box is using the ‘on timer’ event of the form load and it is set to 500 so I can’t use that for anything else that wants a different time, right? I have used the following code and some variations to try and get the box to disappear after a while, but it either fails to disappear, or usually it goes away almost instantly when the form comes up. I have used breakpoint to see if the counter was in fact counting, and it is. It seems to me that if the setting of 500 on the flashing box is fairly slow, that 10000 should take a long time. The timing out code of the text box is as follows:
Private Sub Form_Load()
Dim Counter As Integer
Counter = 0
Do While Counter < 10000 ‘will likely be a smaller value in the end
Counter = Counter + 1
Loop
Text86.Visible = False
What am I doing wrong?
Thanks in advance…
chuck
I’ve been having trouble getting a textbox to disappear after a predetermined period of time. Ultimately, it will not be a text box, but a combination of both a button and a flashing square that surrounds the button that will disappear. Basicly, the button is to close the form, and the flashing red square is to draw the users attention to the message that states that if you find yourself here by mistake, click the button and exit. I want the pair to time out after a few seconds if not clicked. It goes away if the user begins entering data where the curser is located. The text box is for testing purposes only.
The flashing of the box is using the ‘on timer’ event of the form load and it is set to 500 so I can’t use that for anything else that wants a different time, right? I have used the following code and some variations to try and get the box to disappear after a while, but it either fails to disappear, or usually it goes away almost instantly when the form comes up. I have used breakpoint to see if the counter was in fact counting, and it is. It seems to me that if the setting of 500 on the flashing box is fairly slow, that 10000 should take a long time. The timing out code of the text box is as follows:
Private Sub Form_Load()
Dim Counter As Integer
Counter = 0
Do While Counter < 10000 ‘will likely be a smaller value in the end
Counter = Counter + 1
Loop
Text86.Visible = False
What am I doing wrong?
Thanks in advance…
chuck