By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,193 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

ms access 2000 marquee text

P: 3
i don't know how to move label in marquee in the form from left to right continuously
Apr 11 '08 #1
Share this Question
Share on Google+
4 Replies


missinglinq
Expert 2.5K+
P: 3,532
I don't either! Perhaps if you'd care to share with us the code you're using someone can help you with it!

Welcome to bytes!

Linq ;0)>
Apr 11 '08 #2

mshmyob
Expert 100+
P: 903
I have one going from Right to left like a ticker tape if you want that. I find left to right is hard to read since the last letter of the word is coming first.

cheers,


i don't know how to move label in marquee in the form from left to right continuously
Apr 11 '08 #3

FishVal
Expert 2.5K+
P: 2,653
i don't know how to move label in marquee in the form from left to right continuously
If I got it right in general, you mention something like "creeping line".
A possible way to do it is to:
  • define a string variable with the text
  • in timer triggered code get the variable substring starting from sequentially incremented position and render it to TextBox control

Regards,
Fish
Apr 11 '08 #4

mshmyob
Expert 100+
P: 903
Here is some code to scroll from Righ to Left.

Create a form and a textbox. Make the textbox longer than your message (looks best) and only the height of 1 character.

txtScroll is the name of the textBox on your form
vMessage - change the message to your message

Then in the forms On Load event you put the following code.

Expand|Select|Wrap|Line Numbers
  1. ' -------- the following code is needed for the right to left scrolling text box ---------
  2.     Me.txtScroll.Enabled = False
  3.     Me.txtScroll.Locked = True
  4.     Me.txtScroll.TextAlign = 3 ' 3 - enters from right to left
  5.     vCount = 1
  6.  
  7.     ' modify these settings to your liking
  8.     Me.TimerInterval = 200  '1000 = 1 second delay for each character
  9.     vMessage = "This is an example of a horizontal ticker tape display." ' do not have more than 250 characters
  10.     vMessage = vMessage + "     " ' add 5 spaces for effect
  11.     ' end user modify settings
  12.     vLen = Len(vMessage)
  13. '----------- end scrolling text -------------
  14.  

In the On Timer event of the form put the following:

Expand|Select|Wrap|Line Numbers
  1. '-------- code for scrolling text box -------------
  2.     If vCount <= (vLen) Then ' repeat when the counter is same as the message length
  3.         vTicker = vMessage + Mid(vMessage, 1, vCount) ' change the display message by 1 character
  4.         Me.txtScroll = vTicker 'display the message
  5.         vCount = vCount + 1
  6.     Else
  7.         vCount = 1 ' reset counter
  8.     End If
  9. ' ------------ end code scrolling text box -------------
  10.  
In the general area of the form

Expand|Select|Wrap|Line Numbers
  1. Public vCount As Integer
  2. Public vMessage As String
  3. Public vLen As Integer
  4. Public vTicker As String
  5.  
That's it. Change your colour properties of your text box to suit your liking.

cheers,
Apr 11 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.