Hello, I searched and found some posts about scrolling only the top line of text on a 2x16 LK display using VB6, but the links to sample code and such were broken, and they seem old.
My question being, does anyone have some sample VB6 source example code of scrolling a long string on the top line of the LCD? Thanks guys.
Scroll Top Line of 2x16 LK LCD
http://www.lcdforums.com/forums/viewtop ... l+zip#1622
It is an old post I know, but I know it should be possible to code so it scrolls one line.
It is an old post I know, but I know it should be possible to code so it scrolls one line.
-
- Matrix Orbital
- Posts: 745
- Joined: Thu Dec 13, 2001 4:00 pm
- Location: Earth.... I think..
- Contact:
Scrolling is not that hard to do it's just a bit of manipulation with strings.
Assuming you already know how to talk to the display i'll skip that part. (if
you don't look up a tutorial on serial communication with vb6 and use the
lk manual to see what commands you can send)
Lets imageine we have the following string:
"The quick brown fox jumped over the lazy dog"
You start at position 0 and since your display is 16 characters wide you'll take
16 characters and display it on your lcd so it will now display
"The quick brown "
Then you wait a little (or perhaps use a timer in vb)
Then you move on to position 2 and take again 16 characters and display it..
you'll then have
"he quick brown f"
Then you move on to position 3 and take again 16 characters and display it..
you'll then have
"e quick brown fo"
and you'll go on and on till you get to the end of the string and you start again
from the beginning.
Assuming you already know how to talk to the display i'll skip that part. (if
you don't look up a tutorial on serial communication with vb6 and use the
lk manual to see what commands you can send)
Lets imageine we have the following string:
"The quick brown fox jumped over the lazy dog"
You start at position 0 and since your display is 16 characters wide you'll take
16 characters and display it on your lcd so it will now display
"The quick brown "
Then you wait a little (or perhaps use a timer in vb)
Then you move on to position 2 and take again 16 characters and display it..
you'll then have
"he quick brown f"
Then you move on to position 3 and take again 16 characters and display it..
you'll then have
"e quick brown fo"
and you'll go on and on till you get to the end of the string and you start again
from the beginning.