The QBasic Forum     RULES     Other Subforums, Links and Downloads    Index of Threads

  << Previous Topic | Next Topic >>Return to Index  

ProgramList mad_man1

June 25 2006 at 10:14 AM
  (Login mad_man1)
R



    
This message has been edited by iorr5t on May 18, 2007 1:45 PM
This message has been edited by iorr5t on Jul 10, 2006 7:20 AM


 
 Respond to this message   
AuthorReply
mad_man1
(Premier Login iorr5t)
Forum Owner

Mad Tool

July 10 2006, 7:22 AM 

' *****************************************************************
' ********************      By Mad_Man          *******************
' ********************    Build in QBASIC       *******************
' ********************     copyright 2006       *******************
' *****************************************************************
DEFINT A-Z
DECLARE SUB mouse (cx, dx, bx)
DECLARE SUB MousePointer (sw)
DIM SHARED a(9)                 'Set up array for code
DEF SEG = VARSEG(a(0))          'Get array segment (nnnn:    )
'    (two 8 bit)
FOR i = 0 TO 17                 'length of DATA to
  READ r                       'read
  POKE VARPTR(a(0)) + i, r     'into array/2 (nnnn:iiii) (one 8 bit)
NEXT i                          'until 17
' **************************** Machine Code *********************************
DATA &HB8,&H00,&H00   :   ' mov  AX,[n]       [Swap code-(L),(H)] in AX
DATA &H55             :   ' push BP           Save BP
DATA &H8B,&HEC        :   ' mov  BP,SP        Get BP to c Seg
DATA &HCD,&H33        :   ' int  33           Interrupt 33
DATA &H92             :   ' xchg AX,[reg]     [Swap code-reg] in AX
DATA &H8B,&H5E,&H06   :   ' mov  BX,[BP+6]    Point to (variable)
DATA &H89,&H07        :   ' mov  [BX],AX      Put AX in (variable)
DATA &H5D             :   ' pop  BP           Restore BP
DATA &HCA,&H02,&H00   :   ' ret  2            Far return
re = 0
CALL intro
SCREEN 0
' ****************************** Mouse set up ******************************
CALL MousePointer(0)      'Reset mouse and
CALL MousePointer(1)      'turn pointer on
CALL MousePointer(3)      'Get coordinates
' ****************************** P R O G R A M ******************************
' Put your code here
COLOR 2, 1, 7
CLS
CALL home
DO
  CALL mouse(cx, dx, bx)
  colm = cx \ 8 + 1
  rowm = dx \ 8 + 1
  'mouse inputs 1 2 4 8 16
  IF (bx) = 1 AND colm = 5 AND rowm = 10 THEN CALL quick1
  IF (bx) = 1 AND colm = 5 AND rowm = 35 THEN CALL cal
  IF (bx) = 1 AND colm = 7 AND rowm = 10 THEN CALL quick2
  IF (bx) = 1 AND colm = 7 AND rowm = 35 THEN CALL screensaver
  IF (bx) = 1 AND colm = 9 AND rowm = 10 THEN CALL quick3
  IF (bx) = 1 AND colm = 11 AND rowm = 10 THEN CALL quick4
  IF (bx) = 1 AND colm = 13 AND rowm = 10 THEN CALL quick5
  IF (bx) = 1 AND colm = 15 AND rowm = 10 THEN CALL quick6
  IF (bx) = 1 AND colm = 17 AND rowm = 10 THEN CALL quick7
  IF (bx) = 1 AND colm = 19 AND rowm = 10 THEN CALL quick8
  LOCATE 23, 1: PRINT dx; cx; bx; colm; rowm; (re)
  LOCATE 23, 72: COLOR 11: PRINT TIME$; "": COLOR 2
  qw$ = INKEY$
  SELECT CASE qw$
  CASE "d", "D": CALL quick4
  CASE "h", "H": CALL help
  CASE "i", "I": CALL intro
  CASE CHR$(0) + "H": LOCATE 21, 1:   PRINT " ***arow up key***           "
  CASE CHR$(0) + "P": LOCATE 21, 1:   PRINT " ****arow down key****      "
  CASE CHR$(0) + "K": LOCATE 21, 1:   PRINT " ***arow right key***       "
  CASE CHR$(0) + "M": LOCATE 21, 1:   PRINT " ***arow left key***        "
  CASE " ": LOCATE 21, 1: PRINT "****space****                "
  CASE "p", "P": LOCATE 21, 1: PRINT "  *****  Pause  ****    ": SLEEP 5
  CASE "q", "Q": END   'quit
  CASE ELSE
  END SELECT
LOOP
END
DEFSNG A-Z

SUB cal
CLS
PRINT "*************************"
PRINT "* Enter: + for Addition *"
PRINT "* Enter: - for Subtract *"
PRINT "* Enter: * for Multiply *"
PRINT "* Enter: / for Division *"
PRINT "*************************"
WHILE operator$ <> "+" AND operator$ <> "-" AND operator$ <> "*" AND operator$ <> "/"
  INPUT "Which operator do you want to use? "; operator$
  IF operator$ <> "+" AND operator$ <> "-" AND operator$ <> "*" AND operator$ <> "/" THEN
    PRINT "Invalid Operator. Please try again."
  END IF
WEND
CLS
INPUT "Enter a number: "; num1$
INPUT "Enter another number: "; num2$
SELECT CASE operator$
CASE "+"
  PRINT num1$; " + "; num2$; " = "; VAL(num1$) + VAL(num2$)
CASE "-"
  PRINT num1$; " - "; num2$; " = "; VAL(num1$) - VAL(num2$)
CASE "*"
  PRINT num1$; " * "; num2$; " = "; VAL(num1$) * VAL(num2$)
CASE "/"
  WHILE VAL(num2$) = 0 ' Only for num2$, since 0/x = 0
    PRINT "You may not divide by zero."
    INPUT "Please re-enter the second number: "; num2$
  WEND
  PRINT num1$; " / "; num2$; " = "; VAL(num1$) / VAL(num2$)
END SELECT
DO WHILE INKEY$ = "": LOOP
CLS : CALL home
END SUB

SUB help
COLOR 4, 0: CLS
LOCATE 1, 29: PRINT "**** "; : COLOR 10: PRINT "MAD_TOOL'S"; : COLOR 4: PRINT " ****"
LOCATE 2, 1: PRINT "************************************"; : COLOR 10: PRINT "HELP"; : COLOR 4: PRINT "****************************************"
LOCATE 3, 1: PRINT ""
LOCATE 4, 6: COLOR 10: PRINT "This program is simple to run it's was made with INKEY$ and SUB's"; ""
LOCATE 5, 20: PRINT "You press a letter and call a sub"
LOCATE 6, 1: PRINT ""
LOCATE 7, 1: PRINT "PRESS Y to see why I made MAD_TOOL's  "
LOCATE 8, 1: PRINT ""
LOCATE 9, 1: PRINT "subs 1 to 8 are for screen 0 mode "
LOCATE 10, 1: PRINT "subs 9 to 18 are for screen modes 1 to 13"
LOCATE 11, 1: PRINT ""
LOCATE 12, 1: PRINT "the numbers at bottom are the mouse and time "
LOCATE 13, 1: PRINT ""
LOCATE 14, 1: PRINT ""
DO
  qw$ = INKEY$
  SELECT CASE qw$
  CASE "Y", "y": CALL myinfo
  CASE " ": PRINT "**** space ****"
  CASE "p", "P": PRINT "****  Pause  ****": SLEEP 5
  CASE "q", "Q": COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP
' **********************************************************************
END SUB

SUB home
CLS
COLOR 2, 1, 7
LOCATE 1, 28: PRINT "****"; : COLOR 4: PRINT "MAD_TOOL'S 1.0 "; : COLOR 2: PRINT "****"
LOCATE 2, 1: COLOR 4: PRINT "************************************"; : COLOR 6: PRINT "HOME"; : COLOR 4: PRINT "****************************************": COLOR 2
LOCATE 3, 15: COLOR 14: PRINT "**** PRESS Q TO EXIT ****   **** H FOR HELP! ****"; : COLOR 4
LOCATE 5, 7: PRINT "your sub #1 ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 5, 63: PRINT "cal ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 7, 56: PRINT "screen saver ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 7, 7: PRINT "your sub #2 ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 9, 7: PRINT "your sub #3 ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 11, 7: PRINT "your sub #4 ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 13, 7: PRINT "your sub #5 ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 15, 7: PRINT "your sub #6 ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 17, 7: PRINT "your sub #7 ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 19, 7: PRINT "your sub #8 ("; : COLOR 5: PRINT "x"; : COLOR 4: PRINT ")"
LOCATE 23, 1: PRINT "*** MOUSE *****"; ""
END SUB

SUB intro
COLOR 4, 0
CLS
PRINT "*************************************"; : COLOR 14: PRINT "BY"; : COLOR 4: PRINT "****************************************"
PRINT "*******************************************************************************"
PRINT "*****   ********   *********   *********       ********************************"
PRINT "*****    ******    ********  *  ********  ****   ******************************"
PRINT "*****  *  ****  *  *******  ***  *******  ******  *****************************"
PRINT "*****  **  **  **  ******  *****  ******  *******  ****************************"
PRINT "*****  ***    ***  *****           *****  *******  ****************************"
PRINT "*****  **********  ****  *********  ****  ******  *****************************"
PRINT "*****  **********  ***  ***********  ***  ****   ******************************"
PRINT "*****  **********  **  *************  **       ********************************"
PRINT "*******************************************************************************"
PRINT "*******************************************************************************"
PRINT "************************   ********   **********   **********    *******  *****"
PRINT "************************    ******    *********  *  *********  *  ******  *****"
PRINT "************************  *  ****  *  ********  ***  ********  **  *****  *****"
PRINT "************************  **  **  **  *******  *****  *******  ***  ****  *****"
PRINT "************************  ***    ***  ******  *******  ******  ****  ***  *****"
PRINT "************************  **********  *****             *****  *****  **  *****"
PRINT "************************  **********  ****  ***********  ****  ******  *  *****"
PRINT "************************  **********  ***  *************  ***  *******    *****"
PRINT "************************  **********  **  ***************  **  ********   *****"
PRINT "*******************************************************************************"
PRINT "*******************************************************************************"
SLEEP 6
CLS : COLOR 2, 7, 1
CALL home
END SUB
DEFINT A-Z

SUB mouse (cx, dx, bx)
POKE VARPTR(a(4)), &H92           'Swap code,Get CX setup
CALL absolute(cx, VARPTR(a(0)))     'Run Code
'  cx = cx / 8                     'Adjust 25x80
POKE VARPTR(a(4)), &H91           'Swap code,Get DX setup
CALL absolute(dx, VARPTR(a(0)))     'Run Code
dx = dx / 2                     'Adjust 25x80
POKE VARPTR(a(4)), &H93           'Swap code,Get BX setup
CALL absolute(bx, VARPTR(a(0)))     'Run Code
'Note :
'Remove the /8
'for graphics modes.
END SUB

SUB MousePointer (sw)
POKE VARPTR(a(0)) + 1, sw         'Swap code,Set AX = (SW)
CALL absolute(c, VARPTR(a(0)))     'Run Code

'Note:
'SW = 0-reset
'SW = 1-on
'SW = 2-off
'SW = 3-coordinates
END SUB
DEFSNG A-Z

SUB myinfo
PRINT "I made MAD_TOOL's to give a basic programer more dimension with there code"
PRINT "*********************************************************************"
DO
  qw$ = INKEY$
  SELECT CASE qw$
  CASE " ": PRINT "****space****"
  CASE "p", "P": PRINT "    ******* Pause ****** ": SLEEP 5
  CASE "q", "Q": COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP
' **********************************************************************
END SUB

SUB quick1
DEFINT A-Z
CALL MousePointer(0)      'Reset mouse and
CALL MousePointer(1)      'turn pointer on
CALL MousePointer(3)      'Get coordinates
COLOR 4, 0: CLS
' **********************************************************************
PRINT "*******************  inside MAD_SUB #1   ***********************"
PRINT "*************** this sub is for your code ***************************"
PRINT "*********************************************************************"
DO
  IF (bx) = 2 THEN COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CALL mouse(cx, dx, bx)
  qw$ = INKEY$
  SELECT CASE qw$
  CASE "t", "T": GOSUB jump1
  CASE " ": PRINT "*******space**** "
  CASE "p", "P": PRINT "    ********  Pause  ************ ": SLEEP 5
  CASE "q", "Q": COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP

jump1:
INPUT changt$
SHELL (changt$)
RETURN
' **********************************************************************
END SUB
DEFSNG A-Z

SUB quick2
CLS
' **********************************************************************
PRINT "*******************   inside guick sub #2     ***********************"
PRINT "*************** this sub is for your code ***************************"
PRINT "*********************************************************************"
DO
  qw$ = INKEY$
  SELECT CASE qw$
  CASE " ": PRINT "*******space**** "
  CASE "p", "P": PRINT "    ********  Pause  ************ ": SLEEP 5
  CASE "q", "Q": CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP
' **********************************************************************
END SUB

SUB quick3
DEFINT A-Z
CALL MousePointer(0)      'Reset mouse and
CALL MousePointer(1)      'turn pointer on
CALL MousePointer(3)      'Get coordinates
COLOR 4, 0: CLS
' **********************************************************************
PRINT "*************** this sub is for your code ***************************"
PRINT "*********************************************************************"
DO
  IF (bx) = 2 THEN COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CALL mouse(cx, dx, bx)
  qw$ = INKEY$
  SELECT CASE qw$
  CASE " ": PRINT "****space****"
  CASE "p", "P": PRINT "**** Pause ****": SLEEP 5
  CASE "q", "Q": COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP
' **********************************************************************
END SUB
DEFSNG A-Z

SUB quick4
DEFINT A-Z
CALL MousePointer(0)      'Reset mouse and
CALL MousePointer(1)      'turn pointer on
CALL MousePointer(3)      'Get coordinates
COLOR 4, 0: CLS
' **********************************************************************
PRINT "*************** this sub is for your code ***************************"
PRINT "*****************right click back or Q***********************************"
DO
  IF (bx) = 2 THEN COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CALL mouse(cx, dx, bx)
  qw$ = INKEY$
  SELECT CASE qw$
  CASE " ": PRINT "*******space**** "
  CASE "p", "P": PRINT "    ********  Pause  ************ ": SLEEP 5
  CASE "q", "Q": COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP
END SUB
DEFSNG A-Z

SUB quick5
DEFINT A-Z
CALL MousePointer(0)      'Reset mouse and
CALL MousePointer(1)      'turn pointer on
CALL MousePointer(3)      'Get coordinates
COLOR 4, 0: CLS
' **********************************************************************
PRINT "*************** this sub is for your code ***************************"
PRINT "*********************************************************************"
DO
  IF (bx) = 2 THEN COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CALL mouse(cx, dx, bx)
  qw$ = INKEY$
  SELECT CASE qw$
  CASE " ": PRINT "*******space**** "
  CASE "p", "P": PRINT "    ********  Pause  ************ ": SLEEP 5
  CASE "q", "Q": COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP
' **********************************************************************
END SUB
DEFSNG A-Z

SUB quick6
DEFINT A-Z
CALL MousePointer(0)      'Reset mouse and
CALL MousePointer(1)      'turn pointer on
CALL MousePointer(3)      'Get coordinates
COLOR 4, 0: CLS
' **********************************************************************
PRINT "*************** this sub is for your code ***************************"
PRINT "*********************************************************************"
DO
  IF (bx) = 2 THEN COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CALL mouse(cx, dx, bx)
  qw$ = INKEY$
  SELECT CASE qw$
  CASE " ": PRINT "*******space**** "
  CASE "p", "P": PRINT "    ********  Pause  ************ ": SLEEP 5
  CASE "q", "Q": COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP
' **********************************************************************
END SUB
DEFSNG A-Z

SUB quick7
DEFINT A-Z
CALL MousePointer(0)      'Reset mouse and
CALL MousePointer(1)      'turn pointer on
CALL MousePointer(3)      'Get coordinates
COLOR 4, 0: CLS
' **********************************************************************
PRINT "*************** this sub is for your code ***************************"
PRINT "*********************************************************************"
DO
  IF (bx) = 2 THEN COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CALL mouse(cx, dx, bx)
  qw$ = INKEY$
  SELECT CASE qw$
  CASE " ": PRINT "*******space**** "
  CASE "p", "P": PRINT "    ********  Pause  ************ ": SLEEP 5
  CASE "q", "Q": COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP
END SUB
DEFSNG A-Z

SUB quick8
DEFINT A-Z
CALL MousePointer(0)      'Reset mouse and
CALL MousePointer(1)      'turn pointer on
CALL MousePointer(3)      'Get coordinates
COLOR 4, 0: CLS
' **********************************************************************
PRINT "*************** this sub is for your code ***************************"
PRINT "*****************right click back or Q***********************************"
DO
  IF (bx) = 2 THEN COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CALL mouse(cx, dx, bx)
  qw$ = INKEY$
  SELECT CASE qw$
  CASE " ": PRINT "*******space**** "
  CASE "p", "P": PRINT "    ********  Pause  ************ ": SLEEP 5
  CASE "q", "Q": COLOR 2, 1, 7: CLS : CALL home: EXIT SUB
  CASE ELSE
  END SELECT
LOOP
END SUB
DEFSNG A-Z

SUB screensaver
DEFINT A-Z

1:
SCREEN 9

2:
a$ = MKI$(320) + MKI$(175) + MKI$(1) + MKI$(1) + STRING$(12288, 0)

3:
IF x& MOD 128 = 0 THEN MID$(a$, 1, 8) = MKI$(CVI(MID$(a$, 1, 2)) + CVI(MID$(a$, 5, 2))) + MKI$(CVI(MID$(a$, 3, 2)) + CVI(MID$(a$, 7, 2))) + MID$(a$, 5, 4)

4:
IF x& MOD 128 = 0 THEN MID$(a$, 5, 4) = MKI$((2 * ((0 > CVI(MID$(a$, 1, 2))) OR (640 < CVI(MID$(a$, 1, 2)))) + 1) * CVI(MID$(a$, 5, 2))) + MKI$((2 * (0 > CVI(MID$(a$, 3, 2)) OR 350 < CVI(MID$(a$, 3, 2))) + 1) * CVI(MID$(a$, 7, 2)))

5:
IF MID$(a$, x& * 12 + 19, 2) = STRING$(2, 0) THEN MID$(a$, x& * 12 + 9, 12) = MKI$((CVI(MID$(a$, 1, 2)) - 320) * 64) + MKI$((CVI(MID$(a$, 3, 2)) - 175) * 64) + MKI$(RND * 512 - 256) + MKI$(RND * 512 - 256) + MKI$(RND * 15 + 1) + MKI$(RND * 24 + 4) ELSE MID$(a$, x& * 12 + 9, 12) = MKI$(CVI(MID$(a$, x& * 12 + 9, 2)) + CVI(MID$(a$, x& * 12 + 13, 2))) + MKI$(CVI(MID$(a$, x& * 12 + 11, 2)) + CVI(MID$(a$, x& * 12 + 15, 2))) + MID$(a$, x& * 12 + 13, 6) + MKI$(CVI(MID$(a$, x& * 12 + 19, 2)) - 1)

6:
IF MID$(a$, x& * 12 + 19, 2) <> STRING$(2, 0) THEN PSET (CVI(MID$(a$, x& * 12 + 9, 2)) \ 64 + 320, CVI(MID$(a$, x& * 12 + 11, 2)) \ 64 + 175), CVI(MID$(a$, x& * 12 + 17, 2))

7:
PSET ((CVI(MID$(a$, x& * 12 + 9, 2)) - CVI(MID$(a$, x& * 12 + 13, 2))) \ 64 + 320, (CVI(MID$(a$, x& * 12 + 11, 2)) - CVI(MID$(a$, x& * 12 + 15, 2))) \ 64 + 175), 0

8:
x& = (x& + 1) MOD 1024

9:
IF INKEY$ = "" THEN 3
SCREEN 0: CLS : COLOR 2, 1, 7: CALL home:
END SUB
DEFSNG A-Z

SUB winow
CLS
SCREEN 9
' window properties.
row = 10: height = 100
col = 10: length = 200
' --------------------------------------------------------------------------------
' Draw the form's boarder.
' --------------------------------------------------------------------------------
LINE (column, row)-(column + length, row + height), 0, B
' --------------------------------------------------------------------------------
' Create a border and fill it in.
' --------------------------------------------------------------------------------
FOR i% = 1 TO 2
  row = row + 1: column = column + 1: height = height - 1: length = length - 1
  LINE (column, row)-(column + length, row), 7
  LINE (column, row)-(column, row + height), 7
NEXT i%
' --------------------------------------------------------------------------------
' Create the control box.
' --------------------------------------------------------------------------------
row = row + 1: column = column + 1: height = height - 1: length = length - 1
LINE (column, row)-(column + length, row), 0
LINE (column, row)-(column, row + height), 0
LINE (column, row)-(column + 18, row + 18), 7, BF
LINE (column, row)-(column + 18, row + 18), 0, B
LINE (column + 18, row - 2)-(column + 18, row + 5), 0
LINE (column - 2, row + 18)-(column + 5, row + 18), 0
' --------------------------------------------------------------------------------
' Create the click portion in the control box.
' --------------------------------------------------------------------------------
LINE (column + 5, row + 7)-(column + 13, row + 9), 15, BF: LINE (column + 5, row + 7)-(column + 13, row + 9), 0, B
' -------------------------------------------------------------------------------
' Add the click portion's shade.
' --------------------------------------------------------------------------------
LINE (column + 14, row + 7)-(column + 14, row + 9), 8
LINE (column + 6, row + 10)-(column + 14, row + 10), 8, B
' --------------------------------------------------------------------------------
' Create the title bar.
' --------------------------------------------------------------------------------
LINE (column + 18, row)-(column + length, row + 18), 9, BF
LINE (column + 18, row)-(column + length, row + 18), 0, B
LINE (column + length, row - 3)-(column + length + 2, row + height), 7, BF
LINE (column + length, row - 3)-(column + length + 3, row + height), 0, B
LINE (column + length, row - 2)-(column + length, row - 1), 7
LINE (column + length - 18, row - 2)-(column + length - 18, row - 1), 0
LINE (column + length, row + 18)-(column + length + 2, row + 18), 0
' --------------------------------------------------------------------------------
' Create the bottom line border and paint it.
' --------------------------------------------------------------------------------
LINE (column, row + height - 3)-(column + length, row + height - 3), 0, B
LINE (column, row + height - 2)-(column + length + 2, row + height), 7, BF
LINE (column - 2, row + height)-(column + length + 2, row + height), 0, B
' --------------------------------------------------------------------------------
' Get side break lines.
' --------------------------------------------------------------------------------
LINE (column - 2, row + height - 18)-(column, row + height - 18), 0
LINE (column + length - 2, row + height - 18)-(column + length + 2, row + height - 18), 0
LINE (column + 18, row + height)-(column + 18, row + height - 2), 0
LINE (column + length - 18, row + height)-(column + length - 18, row + height - 2), 0
' --------------------------------------------------------------------------------
' Paint the inner form.
' --------------------------------------------------------------------------------
LINE (column + 1, row + 19)-(column + length - 1, row + height - 4), 7, BF
END SUB

 
 Respond to this message   

(Premier Login iorr5t)
Forum Owner

Kool INKEY$

October 24 2006, 6:27 AM 

DECLARE SUB quick1 ()
DECLARE SUB quick2 ()
DECLARE SUB quick3 ()
DECLARE SUB quick4 ()
'*****************************************************************
'******************** Cool INKEY$ By Mad_Man *******************
'******************** Build Q BASIC Program's *******************
'******************** Wile INKEY$ *******************
'*****************************************************************
CLS
DO
qw$ = INKEY$
SELECT CASE qw$
CASE "a", "A": CALL quick1
CASE "b", "B": CALL quick2
CASE "c", "C": CALL quick3
CASE "d", "D": CALL quick4

CASE CHR$(0) + "H": PRINT "***arow up key***"
CASE CHR$(0) + "P": PRINT "****arow down key****"
CASE CHR$(0) + "K": PRINT "***arow right key***"
CASE CHR$(0) + "M": PRINT "***arow left key***"
CASE " ": PRINT "*******space**** "
CASE "p", "P": PRINT " ******** Pause ************ ": SLEEP 5
CASE "q", "Q": END 'quit
CASE ELSE
END SELECT

LOOP

END

SUB quick1
'**********************************************************************
PRINT "******************* inside guick sub #1 ***********************"
'**********************************************************************
END SUB

SUB quick2
PRINT "*************inside quick sub #2***********"
END SUB

SUB quick3
PRINT "****************inside quick sub #3***************"
END SUB

SUB quick4
PRINT "***********************in side quick sub #4**************"
END SUB


 
 Respond to this message   
Current Topic - ProgramList mad_man1
  << Previous Topic | Next Topic >>Return to Index