Weekly Qbasic and Qb64 Lesson Topics
March 28, 2024, 01:56:13 pm
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

The First lesson, by Garry

Pages: [1]
  Print  
Author Topic: The First lesson, by Garry  (Read 1716 times)
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« on: January 21, 2011, 11:23:07 pm »

12:06 a.m. 22/01/2011
 I apologize, it has almost been 2 weeks, ok With this code, you will also see how you can use locate, to put your text in different places on the screen.
 You can also set colors for the text and back ground, use qbasic or qb4.5 HELP, color to get complete color numbers chart,  or just change the numbers I used, and see what happens.NOTE: In the DEMOS category I have posted a demo, with some of the color numbers. Also by change the screen nmbr, 0-13, you can see what effects, this has. The numbers in the LOCATE can be changed to , to get a idea of what parts of the screen the text goes too.
There is more that could be exlained on this, but if I can figure this out, then anyone can,...Ok here is the code:
----------------Code below-------------------
Code:
DEFLNG A-Z

SCREEN 12
COLOR 0, 2
DO
    LOCATE 2, 5
    PRINT " Here it is now"
    PLAY " a4gc-b10c0eg"
    CLS
    LOCATE 15, 22
    PLAY "g10ae,ga0bc"
    PRINT "It went here"
    _DELAY 1
    CLS
    PRINT "any key, quits"
    PRINT "So this is a simple demo of locate,print, and play."
    PRINT " Also, DO, LOOP, UNTIL and INKEY$ ,since there is no key,specified"
    PRINT "then anykey exits the loop"
    _DELAY 2
    CLS
    LOCATE 26, 22
    PRINT "now it is here"
    _DELAY 1
LOOP UNTIL INKEY$ <> "" 
--------------- end code---------------
Of course if you get one or more of the tutorials available, you could breeze thru this basic stuff in a day or 2, ....this is a little special for me, as I wrote this, mostly by memory, althoug I did have to look at a sample someone gave me, to remember the loop until inkey$ <> ""  I have a hard time remembering that.
enjoy, from Garry
« Last Edit: September 07, 2011, 10:24:47 pm by GarrisonRicketson » Report Spam   Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy