Re: Scrolling text on splash screen
- From: "Damon" <Damon@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 17 Oct 2005 13:22:02 -0700
I got the code to work for a 5 line message on the same splash screen. Looks
cool :-)
Unfortunately, to do the 3 page long document and retain its formatting
looks like a very large chore, if it is possible, which I am not sure. Right
now I have the document in a Microsoft Word OLE object. It has retained the
formatting but only shows as much as whatever size I make the object. All I
need is to add a scroll bar so that the user can scroll down, but that seems
to not be an option with the OLE object. Any suggestions?
"Damon" wrote:
> LOL, this is what I get for being obtuse. What I meant by "should scroll" is
> that the user should be able to use the mouse to scroll through the text just
> like you would be able to if the page you are trying to view in a web browser
> is too big for your resolution.
>
> Just so you don't get me wrong, I super appreciate your solution! I just
> wasn't looking for such a beautifully fancy effect. Now that I have it
> though, I am going to try it out. I never even thought of something like this
> and am glad you did. One question though, will this loop through the text or
> stop when it gets to the end of the lines of text; I only scanned the code
> and am not very strong in it regardless.
>
> Once again, thanks so much for the help Allen,
>
> Damon
>
> "Allen Browne" wrote:
>
> > Use the Timer event of the form to replace the Caption of the Label.
> >
> > The example below has 6 lines of text to scroll up in a label named
> > lblScroll that shows 4 lines at a time:
> >
> > Option Compare Database
> > Option Explicit
> >
> > 'Array of the lines to be scrolled in Form_Timer.
> > Private astrScrollText(0 To 5) As String
> >
> > Private Sub Form_Load()
> > 'Purpose: Load the array to use in Form_Timer.
> > astrScrollText(0) = "first line"
> > astrScrollText(1) = "2nd line"
> > astrScrollText(2) = "3rd line"
> > astrScrollText(3) = "4th line"
> > astrScrollText(4) = "5th line"
> > astrScrollText(5) = "last line"
> > End Sub
> >
> > Private Sub Form_Timer()
> > 'Purpose: Assign the text to scroll.
> > Dim i As Integer 'Loop controller.
> > Dim strOut As String 'Output string.
> > Static iIndex As Integer 'Array element index.
> > 'Number of lines high the caption is (zero-based)
> > Const icCaptionHeightLessOne = 3
> >
> > 'Create the output string from the items in the array.
> > For i = 0 To icCaptionHeightLessOne
> > strOut = strOut & astrScrollText((iIndex + i) _
> > Mod (UBound(astrScrollText) + 1)) & vbCrLf
> > Next
> >
> > 'Assign to the caption of the label.
> > Me.lblScroll.Caption = strOut
> >
> > 'Move the static array index to the next item.
> > iIndex = iIndex + 1
> > If iIndex > UBound(astrScrollText) Then
> > iIndex = LBound(astrScrollText)
> > End If
> > End Sub
> >
> > --
> > Allen Browne - Microsoft MVP. Perth, Western Australia.
> > Tips for Access users - http://allenbrowne.com/tips.html
> > Reply to group, rather than allenbrowne at mvps dot org.
> >
> > "Damon" <Damon@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:E5222B87-2D24-422B-961F-81AB525889F9@xxxxxxxxxxxxxxxx
> > >I have a splash screen that has a field I want to put about 3 pages of text
> > > into. The field should only show 3 or 4 lines of text and should scroll.
> > > The
> > > text will never change, therefore it should not be editable. I have tried
> > > to
> > > do this but can get it to work. How would you all do this?
> > >
> > > thanks,
> > > Damon
> >
> >
> >
.
- References:
- Re: Scrolling text on splash screen
- From: Allen Browne
- Re: Scrolling text on splash screen
- From: Damon
- Re: Scrolling text on splash screen
- Prev by Date: RE: Form, 3211 Error, could not lock table, already used in form.
- Next by Date: removing the blank entry from a combo box?
- Previous by thread: Re: Scrolling text on splash screen
- Next by thread: Re: Scrolling text on splash screen
- Index(es):
Relevant Pages
|