Results 1 to 3 of 3

Thread: marquee

  1. #1
    Zambi
    Guest

    marquee

    How can i have the text on my prog scrool across the form. like a marquee.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Set the CurrentX and CurrentY on the form to position next output and use Print method on the form to print the text on it. Declare a decrementing counter variable which you use in a timer and change CurrentX accordingly before you print.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    VB Code:
    1. Option Explicit
    2. Dim XVal
    3. Dim Phrase as String
    4.  
    5. Private Sub Form_Load()
    6.    Me.ScaleMode = vbPixels
    7.    Label1.Autosize = True
    8.    Label1.Caption = Phrase
    9.    Label1.Visible = False
    10. End Sub
    11. Private Sub Timer1_Timer()
    12.    XVal = XVal + 1
    13.    If XVal > Me.ScaleWidth + Label1.Width * 2 Then XVal = 0
    14.    Me.CurrentX = Xval - Label1.Width
    15.    Me.Print Phrase
    16. End Sub
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

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