Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Scrolling Marquee

VooDoo_06VooDoo_06 Posts: 3Member
I would like to integrate a scrolling marquee into my program. If any1 has any code i could use the help. thanks.

Comments

  • ImDaFrEaKImDaFrEaK Posts: 29Member
    What version of VB are you using and are you not happy with the standard progress bar. You know you can make it a scrolling marquee.
  • Bulldog_466Bulldog_466 Posts: 4Member
    : I would like to integrate a scrolling marquee into my program. If any1 has any code i could use the help. thanks.
    :
    '===========================================================================
    ' Subject: SIMPLE BANNER SCROLL Date: 09-05-95 (16:43)
    ' Author: The ABC Programmer Code: QB, QBasic, PDS
    ' Origin: Used within the ABC Reader Packet: TEXT.ABC
    '===========================================================================
    ' Simple Banner Scroll by William Yu 09-05-1995
    ' Scrolls a line of text from right to left

    DEFINT A-Z
    DECLARE SUB Delay (Seconds!)
    DECLARE SUB BannerScroll (Text$, ForeColor, BackColor, BeginCol, EndCol, Row)

    CLS

    ' Make sure you add a trailing space at the end of TEXT$

    Text$ = "Hello, my name is William Yu, and I'm The ABC Programmer. "
    ForeColor = 15
    BackColor = 0
    BeginCol = 70
    EndCol = 20
    Row = 25

    BannerScroll Text$, ForeColor, BackColor, BeginCol, EndCol, Row

    SUB BannerScroll (Text$, ForeColor, BackColor, BeginCol, EndCol, Row)

    ' Since this is a banner scroll, the starting point is always the highest
    ' If not then we exit the subroutine

    IF EndCol >= BeginCol THEN EXIT SUB

    DEF SEG = &HB800 ' You must have a Color Monitor to use POKE

    Y = 0
    FOR X = BeginCol TO EndCol STEP -1
    Y = Y + 1
    LOCATE Row, X: COLOR ForeColor, BackColor: PRINT LEFT$(Text$, Y);
    ' If you like, you can have multiple colors
    ' To do this you POKE the color attribute to anything you want
    ' Here's an example, you'll have to modify it to suit your banner method
    POKE 3977, 7
    POKE 3979, 8
    ' Another way is to use random colors or define colors in an array.
    Delay .1
    NEXT X
    Y = 1
    H = BeginCol - EndCol + 1
    E = LEN(Text$)
    DO
    Y = Y + 1
    LOCATE Row, EndCol: COLOR ForeColor, BackColor: PRINT MID$(Text$, Y, H);
    Delay .1
    LOOP UNTIL Y = E

    END SUB

    DEFSNG A-Z
    SUB Delay (Seconds)
    Time = TIMER
    XDELAY = Time + Seconds
    WHILE NOT (TIMER > XDELAY)
    WEND
    IF INKEY$ <> "" THEN END
    END SUB
Sign In or Register to comment.