Click to See Complete Forum and Search --> : Frame1.move


AndyK
October 1st, 1999, 04:06 PM
OK, I use this code:

X = 4920
Do Until X <= 120
X = X - 30
DoEvents
Frame1.Move X, 0, 4575, 4455
Loop



to scroll my Frame1.....but it won't scroll smoothly, it always scrolls faster or slower, and keeps on jumping from fast to slow
Is there anyway I can generate high performance scrolling?? Smooth with same speed...no jumps

Thank You

Ravi Kiran
October 4th, 1999, 02:42 AM
Use a timer. Add a timer control to your form and
add the _timer event handler to handle the moving of the Frame. This may be a little smoother than your code, because time taken for "doEvents" depends on the no. of events that are presently there, which may not be uniform always.

private sub timer1_timer()
if frame1.Left <= 120 then
timer1.enabled = false
exit sub
end if
Frame1.left = Frame1.left - 30
' you dont need to set the size each time!
end sub
... elsewhere, to start the scrolling
Frame1.Move 4920,0,4575,4455 ' or whatever
timer1.interval = 100
timer1.Enabled = true




RK