|
-
September 28th, 1999, 02:41 PM
#1
A little problem....
this code is in the timer
max = max + 1
Text1.text = mid("blah", 1, max)
If max = 20 then Timer5.Enabled = false
Problem is that when timer being enabled, it just types in one first letter..."b" and stops, when it should keep on typing in whole word "blah"
I tried to remove If max = 20 Then Timer5.Enabled = False, still no effect....Please help
Thank You
-
September 28th, 1999, 03:23 PM
#2
Re: A little problem....
Hi
You'll need to make the 'max' variable 'static' in that routine (so that it retains it's value between calls).
eg:
static max as Integer
max = max + 1
Text1.Text = mid("blah", 1, max)
If max = 20 then Timer5.Enabled = false
I'd also recommend that you change the last line to something like :
If max = 20 then
max = 0
Timer5.Enabled = false
End if
- so that the 'max' value get's reset again (otherwise it'll keep on going up & up).
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|