Since you're using VB for DOS, you may not be in the wrong forum, however...

by (Login qb432l)
Mod

 

Click the Subforums and Chatroom link at the top of the page. Part way down you'll see a Visual Basic sub forum. It covers newer versions of VB, however, so perhaps we can field your question here.

There are two ways in QBasic to display progress bars. In text mode (default SCREEN 0), you would use a series of ASCII characters, such as 219 in an appropriate color.

COLOR 10
'Each value of n represents 2 percent.
FOR n = 1 TO 50
LOCATE 10, n + 10
PRINT CHR$(219);
NEXT n

In graphics mode, you would use a LINE statement to draw the progress bars:

SCREEN 12

FOR n = 1 TO 50
LINE (50 + n * 10, 100)- (50 + n * 10 + 8, 110), 9, BF
NEXT n

Are you familiar at all with QBasic graphics/text modes?

-Bob

Posted on Apr 19, 2010, 7:46 AM

Respond to this message   

Return to Index

Response TitleAuthor and Date
Starting to lurn it on Apr 19
 For that you would need graphics mode... on Apr 19

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement