Qbasic

Moderators: None (Apply to moderate this forum)
Number of threads: 81
Number of posts: 235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Scrolling Marquee Posted by VooDoo_06 on 31 May 2005 at 10:22 AM
I would like to integrate a scrolling marquee into my program. If any1 has any code i could use the help. thanks.
Report
Re: Scrolling Marquee Posted by ImDaFrEaK on 27 Mar 2006 at 12:21 PM
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.
Report
Re: Scrolling Marquee Posted by Bulldog_466 on 7 Nov 2006 at 4:47 AM
: 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



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.