Link to home
Start Free TrialLog in
Avatar of dreammaster
dreammaster

asked on

MOVING TEXT = VB6

Could anyone please advise one , on how to do rolling text in a lblbox, one has attempted to do the following code but cannot get nothing to happen.

Private sub timer1_timer()
lbldate.caption=format(date,dd:mmmm:yyyy")
lbldate.refresh
end sub

private sub timer2_timer()
lblclock.caption=format(time,"hh:mm:ss")
lblclock.refresh
end sub


This is the code one is having trouble with below:

private sub timer3_timer()
lblmarquee.caption="Nice To See You Again"
lblmarquee.refresh
lblmarquee.move
lblmarquee.left+40,.top
If lblmarquee.left>(me.width-me.left) Then
lblmarquee.left
end if
end sub

Could anyone PLEASE suggest how one can add MOVING TEXT in a lblbox within a Frame. One would like it to MOVE from the right to the left repeating.

Thank You!
Avatar of PlanetCpp
PlanetCpp

you could either move the label in the frame by setting its left property. have two label that will act like a train as one goes out of view the other comes in then the one thats on the right will get moved behind the other and so on.
or use string manipulation to do it
use left and right functions to make it go
text
tex
te
t

t
xt
ext
text
simple loop and counter will do it with left and right functions
ASKER CERTIFIED SOLUTION
Avatar of speke
speke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dreammaster

ASKER

Thank You for your help,

One would like to know how one could use two lblmarquee's one at the top as per your Input and one in the lbl at the bottom of the frame displaying two different messages.

One hopes you can advise me !

Thank you!.