|
-
Jul 5th, 2000, 12:43 AM
#1
Thread Starter
Hyperactive Member
How can I make the text move smoother?
Private Sub Timer1_Timer()
If Text1.Top > -15240 Then
Text1.Top = Text1.Top - 200
Else
Text1.Top = 4800
End If
End Sub
The timer interval is set at 300...
-
Jul 5th, 2000, 12:51 AM
#2
What do you mean, Smoother?
-
Jul 5th, 2000, 12:53 AM
#3
Lively Member
Make the timer interval smaller, and the move steps smaller.
Code:
Private Sub Timer1_Timer()
If Text1.Top > -15240 Then
Text1.Top = Text1.Top - 100
Else
Text1.Top = 4800
End If
End Sub
Set the Timer1.Interval to 150
Andrew Empson
vb6(ent) SP4
-
Jul 5th, 2000, 12:54 AM
#4
Thread Starter
Hyperactive Member
When it moves... it kind of skips... I want it to move smoother like ill use dots for a poor example
Mine does this
.. .. .. .. .. ..
I want it to go smoother
......................
I know that I would have to make it cover more frames (if you can call it that), cause its skipping certain frames... I think I confused you more...
-
Jul 5th, 2000, 12:55 AM
#5
transcendental analytic
1. YOu could set a lower interval(50) to the timer and smaller value for text1.top to decrease
Code:
Text1.Top = Text1.Top - 50
2. You could use a loop instead
Code:
Do
Doevents
If Text1.Top > -15240 Then
Text1.Top = Text1.Top - 15
Else
Text1.Top = 4800
End if
Loop until Youwanttoexitme
Make sure you can exit your loop by putting a boolean variable or expression instead of Youwanttoexitme
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jul 5th, 2000, 01:00 AM
#6
Thread Starter
Hyperactive Member
Yeah , i just did that Kedaman, thanks everyone
-
Jul 5th, 2000, 01:01 AM
#7
Code:
Do Until Text1.Top = 3000
DoEvents
Text1.Top = Text1.Top + 1
Loop
This code will make the textbox move down. A subtraction symbol (-) will make it go up.
Set the top to anything.
-
Jul 5th, 2000, 01:03 AM
#8
Damn! A lot of people replied while I was testing the code out ;]. Oh well, any kind of code that is submitted and works is useful...whether it be the long way or the short way .
-
Jul 5th, 2000, 01:05 AM
#9
Thread Starter
Hyperactive Member
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
|