VB Kiosk

B

Brian J

I am trying to make a VB .Net Kiosk which will
automatically scroll through an RTF file. I can load the
RTF file into a RichTextBox but so far I haven't been able
to get the application to continuously scroll through the
file and start over when it get to the end of the file.
Any ideas on how to automatically scroll a RichTextBox? Is
there a better way to do this (in Vb.net or ASP.Net)?
 
E

Erik Frey

Rather than trying to get the RichTextBox itself to scroll, try this:

Poor man's scrolling:

1) Put the RichTextBox in a Panel.
2) Set the height of the RichTextBox so that all of the document text
fits without scrolling. (Yes, even if it makes the RichTextBox huge, bigger
than the panel or form it's in)
3) Use a Timer control, and in Timer_Tick, experiment with moving the
RichTextBox. To move up -> RichTextBox.Top = RichTextBox.Top - 5, or
whatever you want. Test if the RichTextBox is out of view to cycle it back
to the bottom -> If (RichTextBox.Top + RichTextBox.Height < 0) Then ...

Hope that helps.

Erik
 
J

Jeremy Cowles

Erik Frey said:
Rather than trying to get the RichTextBox itself to scroll, try this:

Poor man's scrolling:

The need for "poor man's" scrolling has been eliminated with the advent of
the AutoScroll property, check it out.

~
Jeremy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top