marque text (1 Viewer)

theDBguy

I’m here to help
Staff member
Local time
Today, 04:46
Joined
Oct 29, 2018
Messages
21,358
If you're using a timer, maybe try a shorter time interval with shorter amount of distance for the movement.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:46
Joined
Feb 28, 2001
Messages
27,001
It will not only depend on timing interval, but also the font you use. If you are using a non-proportional font then adding a space in front of your text will be a bigger amount than if it is a proportional font.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:46
Joined
May 7, 2009
Messages
19,175
Simply, you can't! Access is not the right tool for animation.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 11:46
Joined
Feb 19, 2013
Messages
16,555
see this currently active link - perhaps one of the methods suggested is better that whatever you are using at the moment

 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:46
Joined
Feb 28, 2001
Messages
27,001
Instead of a scrolling marquee, if you would want "bouncing text" then you can put a label inside a rectangle. Turn off the label's borders, turn on the rectangle's borders, and then set up your form timer to move the top & left of the label by some non-zero but small fixed amount. It might not be a good idea to try to move things too fast, though, because fast timers can be a real drain on resources.

Check for that moment when the invisible borders of the label "touch" the borders of the rectangle. When it happens, change the fixed "move" amount based on which borders collided. If it was top or bottom, swap the sign of the vertical move amount. If it was left or right, swap the sign of the horizontal move amount. If you do it that way, you can move as little as one twip at the time (twips of course being the size/placement unit of all controls on the form.)

In this approach, if the label is very big with respect to the rectangle, it becomes impractical because you will not move very far before you change direction again. It will not be smooth even with a small move increment in that case.
 

Users who are viewing this thread

Top Bottom