Results 1 to 3 of 3

Thread: Scroller

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Posts
    6

    Post

    i can't get the Text scroller in the tips section to work . Can anyone help, I just need a Vertical text scroller, thanks.

    [This message has been edited by marco0009 (edited 02-21-2000).]

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Try something like this:
    Code:
    'Place a Timer on the Form and a Label inside a Picturebox Control....
    Private Sub Form_Load()
        Label1 = "Scrolly Thing.." & vbCrLf & vbCrLf & _
        "Line1" & vbCrLf & _
        "Line2" & vbCrLf & _
        "Line3" & vbCrLf & _
        "Line4"
        Timer1.Interval = 100
    End Sub
    
    Private Sub Timer1_Timer()
        Static sLastTag As String
        Static YPos As Long
        
        If Label1 <> sLastTag Then
            Label1.AutoSize = True
            sLastTag = Label1
            Picture1.ScaleMode = vbPixels
            YPos = Picture1.ScaleHeight
            Label1.Left = (Picture1.ScaleWidth - Label1.Width) / 2
        End If
        If YPos > -Picture1.TextHeight(sLastTag) Then
            YPos = YPos - 3
        Else
            YPos = Picture1.ScaleHeight
        End If
        Label1.Top = YPos
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Certified AllExperts Expert

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Posts
    6

    Question

    This may seem stupid, but is a pictur box control just a regular picturebox? if so it is still not working, it puts text on the form itself, not the label or picbox
    Marco0009
    Kid Coder
    ---------
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width