home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / baswind8.zip / QUERY.SUB < prev    next >
Text File  |  1990-09-14  |  16KB  |  563 lines

  1. '
  2. '
  3. '******************************************************************************
  4. '                    Function : QUERY                                         *
  5. '                                                                             *
  6. ' Purpose:                                                                    *
  7. '                                                                             *
  8. '                                                                             *
  9. ' Results:                                                                    *
  10. '                                                                             *
  11. ' Usage  :                                                                    *
  12. '                                                                             *
  13. '                                                                             *
  14. ' Date Written : 09/01/90 - Date Tested: 09/01/90 - Author: James P Morgan    *
  15. ' Date Modified:          -            :          -       :                   *
  16. '-----------------------------------------------------------------------------*
  17. ' NOTE:                                                                       *
  18. '******************************************************************************
  19. '                                                                             *
  20. '     SUB PROGRAM NAME          (PARAMETERS)                 STATIC/RECURSIVE *
  21. '-----------------------------------------------------------------------------*
  22. '                                                                             *
  23. '============================================================================
  24. '
  25. '
  26. SUB    QUERY(MSGLINES%,MSGDAT$(1),QUADRANT$,MSG1$,LEFT.BUTTON.MSG$,LEFT.BUTTON.REPLY$,RIGHT.BUTTON.MSG$,RIGHT.BUTTON.REPLY$,QUERY.TYPE%,RETURN.CODE%) STATIC
  27. 100:
  28.        DEFINT A-Z
  29.  
  30.        VIDEO.RETURN.CODE%=0
  31.        MAKEWIND.RETURN.CODE%=0
  32.        SETQUAD.RETURN.CODE%=0
  33.  
  34.        MSGDAT.MIN=LBOUND(MSGDAT$)               'adjust to callers "OPTION BASE"
  35.  
  36. 'Determine Maximum Length of Messages
  37.  
  38.        MSGLEN%=0
  39. 110:
  40.        MENU.TOP.ROW=0
  41.        MENU.TOP.LEFT.COL=0
  42.        MENU.BOTTOM.ROW=0
  43.        MENU.BOTTOM.RIGHT.COL=0
  44.  
  45.        FIRST.TIME=-1
  46.  
  47.  
  48. '
  49. '
  50.        SELECT CASE QUERY.TYPE%
  51.           CASE 0                                'caution/question type window
  52.               FRAME=1
  53.               FORE=0                            'black
  54.               BACK=6                            'yellow
  55.               SHADOW=1
  56.               ACTIVE.FG%=0
  57.               ACTIVE.BG%=7                      'white
  58.               INACTIVE.FG%=0
  59.               INACTIVE.BG%=6
  60.               LABEL$=""
  61.           CASE 1                                'warning type window
  62.               FRAME=1
  63.               FORE=15                           'high intensity white
  64.               BACK=4                            'red
  65.               SHADOW=1
  66.               ACTIVE.FG%=0                      'black
  67.               ACTIVE.BG%=7                      'white
  68.               INACTIVE.FG%=7
  69.               INACTIVE.BG%=4
  70.               LABEL$=""
  71.           CASE ELSE
  72.               FRAME=1
  73.               FORE=0
  74.               BACK=6
  75.               SHADOW=1
  76.               ACTIVE.FG%=0
  77.               ACTIVE.BG%=7
  78.               INACTIVE.FG%=0
  79.               INACTIVE.BG%=6
  80.               LABEL$=""
  81.          END SELECT
  82.  
  83. '
  84. 120:
  85.        CLICK=0
  86.  
  87.        LFT%=0
  88.        RGT%=0
  89.  
  90.        BUTTONS%=0                               'assume no mouse support avail
  91.  
  92.        CALL MMCHECK(BUTTONS%)                   'see if mouse support avail
  93.  
  94.        MOUSEROW=0
  95.        MOUSECOL=0
  96.  
  97.        CALL MMSETLOC(MOUSECOL,MOUSEROW)         'locate the mouse in upper left
  98.  
  99.        CALL MMCURSORON
  100.  
  101.        CALL MMGETLOC(MOUSECOL,MOUSEROW)
  102.  
  103. 'find the length of the longest message line
  104. '
  105. 200:
  106.        FOR I=MSGDAT.MIN TO MSGDAT.MIN+MSGLINES%
  107.            IF LEN(MSGDAT$(I)) > MSGLEN% THEN
  108.                MSGLEN%=LEN(MSGDAT$(I))
  109.            END IF
  110.  
  111.        NEXT
  112.  
  113.  
  114.        MSG$=LTRIM$(RTRIM$(MSG1$))
  115.  
  116.        IF MSGLEN%<LEN(MSG$) THEN                'make the header as big as
  117.            MSGLEN%=LEN(MSG$)                    'longest message , if need be
  118.        END IF
  119.  
  120. ' insure message buttons the same size as the largest of the two
  121.  
  122.        LEFT.BUTTON.MSG$=LTRIM$(RTRIM$(LEFT.BUTTON.MSG$))
  123.        RIGHT.BUTTON.MSG$=LTRIM$(RTRIM$(RIGHT.BUTTON.MSG$))
  124.  
  125.        LEFT.BUTTON.LEN=LEN(LEFT.BUTTON.MSG$)
  126.        RIGHT.BUTTON.LEN=LEN(RIGHT.BUTTON.MSG$)
  127.  
  128.        IF LEFT.BUTTON.LEN<8 THEN                'a button is a minimum  of 8 characters
  129.           BUTTON.PAD=(8-LEFT.BUTTON.LEN)\2
  130.           LEFT.BUTTON.MSG$=SPACE$(BUTTON.PAD)+LEFT.BUTTON.MSG$+SPACE$(8)
  131.           LEFT.BUTTON.MSG$=LEFT$(LEFT.BUTTON.MSG$,8)
  132.           LEFT.BUTTON.LEN=LEN(LEFT.BUTTON.MSG$)
  133.        END IF
  134.  
  135.        IF RIGHT.BUTTON.LEN<8 THEN
  136.           BUTTON.PAD=(8-RIGHT.BUTTON.LEN)\2
  137.           RIGHT.BUTTON.MSG$=SPACE$(BUTTON.PAD)+RIGHT.BUTTON.MSG$+SPACE$(8)
  138.           RIGHT.BUTTON.MSG$=LEFT$(RIGHT.BUTTON.MSG$,8)
  139.           RIGHT.BUTTON.LEN=LEN(RIGHT.BUTTON.MSG$)
  140.        END IF
  141.  
  142. 'make both buttons the same size (as the longest of the two)
  143.  
  144.        BUTTON.PAD%=ABS(LEFT.BUTTON.LEN-RIGHT.BUTTON.LEN)\2
  145.        IF LEFT.BUTTON.LEN<RIGHT.BUTTON.LEN THEN
  146.            BUTTON.STRING$=STRING$(255," ")
  147.            MID$(BUTTON.STRING$,1+BUTTON.PAD%)=LEFT.BUTTON.MSG$
  148.            LEFT.BUTTON.MSG$=LEFT$(BUTTON.STRING$,RIGHT.BUTTON.LEN)
  149.        END IF
  150.  
  151.        IF RIGHT.BUTTON.LEN<LEFT.BUTTON.LEN THEN
  152.            BUTTON.STRING$=STRING$(255," ")
  153.            MID$(BUTTON.STRING$,1+BUTTON.PAD%)=RIGHT.BUTTON.MSG$
  154.            RIGHT.BUTTON.MSG$=LEFT$(BUTTON.STRING$,LEFT.BUTTON.LEN)
  155.        END IF
  156.  
  157.        BUTTON.STRING$=""
  158.  
  159.        LEFT.BUTTON.LEN=LEN(LEFT.BUTTON.MSG$)
  160.        RIGHT.BUTTON.LEN=LEN(RIGHT.BUTTON.MSG$)
  161.  
  162.        TEMP.MSGLEN=LEFT.BUTTON.LEN+RIGHT.BUTTON.LEN+8
  163.  
  164. ' make message header as wide as both buttons, if need be and center it
  165.  
  166.        IF MSGLEN%<TEMP.MSGLEN THEN
  167.           MSGLEN%=TEMP.MSGLEN
  168.        END IF
  169.  
  170.        MSG.STRING$=STRING$(255," ")
  171.  
  172.        MSG.PAD=ABS(LEN(MSG$)-MSGLEN%)\2
  173.  
  174.        MID$(MSG.STRING$,1+MSG.PAD)=MSG$
  175.  
  176.        MSG$=LEFT$(MSG.STRING$,LEN(MSG$)+(2*MSG.PAD))
  177.  
  178.        MSG1$=MSG$
  179.  
  180.        MSGLEN%=MSGLEN%+2
  181.  
  182.  'If Quadrant is in ROW:COL format, extract Row and Column
  183.  
  184.        IF INSTR(QUADRANT$,":")<>0 THEN
  185.              GOSUB QUERY.GET.ORD
  186.           GOTO QUERY.GO1
  187.        END IF
  188.  
  189.  'Determine Position based on Quadrant Parameter and size of QUERY Messages
  190.  
  191.        QUADRANT = VAL(QUADRANT$)
  192.  
  193.        IF QUADRANT <0 OR QUADRANT >4 THEN
  194.            QUADRANT=0
  195.        END IF
  196.  
  197.        CALL SETQUAD(QUADRANT,CROW,CCOL,MSGLEN%+8,MSGLINES%+8,SETQUAD.RETURN.CODE%)
  198.  
  199.        ULR=CROW-((MSGLINES%+7)/2)               'adjust for header lines
  200.        ULC=CCOL-(MSGLEN%/2)
  201.        LRR=ULR+MSGLINES%+7
  202.        LRC=ULC+MSGLEN%-1
  203. '
  204. 'Create Window for QUERY Box
  205. QUERY.GO1:
  206.  
  207.        CALL MMCURSOROFF
  208.  
  209.        LABEL$=""
  210.        GROW=0
  211.  
  212.        QUERY.ULR=ULR                            'remember co-ordinates for QUERY window
  213.        QUERY.ULC=ULC
  214.        QUERY.LRR=LRR
  215.        QUERY.LRC=LRC
  216.  
  217.        CALL MAKEWIND(ULR,ULC,LRR,LRC,FRAME,FORE,BACK,GROW,SHADOW,LABEL$,MAKEWIND.RETURN.CODE%)
  218.  
  219.        ATTR=(BACK AND 7)*16+FORE
  220.        ROW=ULR
  221.        COL=ULC
  222.        MSG$=STRING$(MSGLEN%,205)
  223.        CALL FASTPRT(MSG$,ROW,COL,ATTR,VIDEO.RETURN.CODE%)
  224.        ROW=ULR+2
  225.        CALL FASTPRT(MSG$,ROW,COL,ATTR,VIDEO.RETURN.CODE%)
  226.  
  227.        IF QUERY.TYPE%=1 THEN                    'warning type window?
  228.            ATTR=&hCF
  229.        END IF
  230.  
  231.        ROW=ULR+1
  232.        COL=ULC
  233.  
  234.        MSG$=MSG1$                               'Place 'QUERY' Message in Box
  235.  
  236.        CALL FASTPRT(MSG$,ROW,COL,ATTR,VIDEO.RETURN.CODE%)
  237.  
  238.        IF QUERY.TYPE%=1 THEN
  239.            FORE=7
  240.            ATTR=(BACK AND 7)*16+FORE
  241.        END IF
  242. 300:
  243.        FOR I=MSGDAT.MIN TO MSGDAT.MIN+MSGLINES% 'Place QUERY Text in Box
  244.            ROW=ULR+(I-MSGDAT.MIN)+4         'normalize to base 1
  245.            COL=CCOL-(MSGLEN%/2)+1
  246.            MSG$=MSGDAT$(I)
  247.            CALL FASTPRT(MSG$,ROW,COL,ATTR,VIDEO.RETURN.CODE%)
  248.        NEXT
  249.  
  250.        CALL MMCURSORON
  251.  
  252. '
  253. 'Draw Cancel and Continue Boxes
  254. QUERY.SHIFT:
  255.        CALL MMCURSOROFF
  256.  
  257.        IF FIRST.TIME THEN
  258.            MOUSEROW=0
  259.            MOUSECOL=0
  260.            CALL MMSETLOC(MOUSECOL,MOUSEROW)
  261.        END IF
  262.  
  263.        BOXULR=ULR+6+MSGLINES%
  264.        BOXLRR=BOXULR
  265.  
  266.        BOXULC=CCOL-4-LEN(LEFT.BUTTON.MSG$)
  267.        BOXLRC=CCOL-5
  268.  
  269.        MENU.TOP.ROW=BOXULR-1
  270.        MENU.BOTTOM.ROW=BOXLRR+1
  271.  
  272.        IF RETURN.CODE%=0 THEN
  273.            BACK=ACTIVE.BG%
  274.            FORE=ACTIVE.FG%
  275.            MENU.TOP.LEFT.COL=BOXULC-1
  276.            MENU.BOTTOM.RIGHT.COL=BOXLRC+1
  277.        ELSE
  278.            BACK=INACTIVE.BG%
  279.            FORE=INACTIVE.FG%
  280.        END IF
  281.  
  282.        SHADOW=0
  283.  
  284.        LEFT.ULR=BOXULR-1
  285.        LEFT.ULC=BOXULC-1
  286.        LEFT.LRR=BOXLRR+1
  287.        LEFT.LRC=BOXLRC+1
  288.  
  289.        CALL MAKEWIND(BOXULR,BOXULC,BOXLRR,BOXLRC,FRAME,FORE,BACK,GROW,SHADOW,LABEL$,MAKEWIND.RETURN.CODE%)
  290.  
  291.        MSG$=LEFT.BUTTON.MSG$
  292.  
  293.        COL=BOXULC
  294.        ATTR=(BACK AND 7)*16+FORE
  295.        CALL FASTPRT(MSG$,BOXULR,COL,ATTR,VIDEO.RETURN.CODE%)
  296.  
  297.        BOXULC=CCOL+4
  298.        BOXLRC=CCOL+3+LEN(RIGHT.BUTTON.MSG$)
  299.  
  300.        IF RETURN.CODE%=0 THEN
  301.            BACK=INACTIVE.BG%
  302.            FORE=INACTIVE.FG%
  303.        ELSE
  304.            BACK=ACTIVE.BG%
  305.            FORE=ACTIVE.FG%
  306.            MENU.TOP.LEFT.COL=BOXULC-1
  307.            MENU.BOTTOM.RIGHT.COL=BOXLRC+1
  308.        END IF
  309.  
  310.        SHADOW=0
  311.  
  312.        RIGHT.ULR=BOXULR-1
  313.        RIGHT.ULC=BOXULC-1
  314.        RIGHT.LRR=BOXLRR+1
  315.        RIGHT.LRC=BOXLRC+1
  316.  
  317.        CALL MAKEWIND(BOXULR,BOXULC,BOXLRR,BOXLRC,FRAME,FORE,BACK,GROW,SHADOW,LABEL$,MAKEWIND.RETURN.CODE%)
  318.  
  319.        MSG$=RIGHT.BUTTON.MSG$
  320.  
  321.        ATTR=(BACK AND 7)*16+FORE
  322.        COL=BOXULC
  323.        CALL FASTPRT(MSG$,BOXULR,COL,ATTR,VIDEO.RETURN.CODE%)
  324.  
  325.        IF FIRST.TIME THEN
  326.            MOUSEROW=(MENU.TOP.ROW)*8
  327.            MOUSECOL=((MENU.TOP.LEFT.COL+((MENU.BOTTOM.RIGHT.COL-MENU.TOP.LEFT.COL)\2))-1)*8
  328.            CALL MMSETLOC(MOUSECOL,MOUSEROW)
  329.            FIRST.TIME=0
  330.        END IF
  331.  
  332.        CALL MMCURSORON
  333. '
  334. QUERY.PRESS:
  335.        GOSUB  QUERY.GET.PRESS
  336.  
  337.        IF KP$="" THEN
  338.            GOTO QUERY.PRESS
  339.        END IF
  340.  
  341.        IF LEN(KP$)=2 THEN                       'extended function key pressed
  342.            GOTO QUERY.PRESS.EXTENDED
  343.        END IF
  344.  
  345.        IF KP$=CHR$(27) THEN                     'ESC key pressed
  346.            RETURN.CODE%=-1
  347.          GOTO QUERY.DONE
  348.        END IF
  349.  
  350.        IF KP$=CHR$(13) THEN                     'ENTER key pressed
  351.            GOTO QUERY.DONE
  352.        END IF
  353.  
  354.        IF INSTR(LEFT.BUTTON.REPLY$,KP$)<>0 THEN
  355.            IF RETURN.CODE%=1 THEN
  356.                RETURN.CODE%=0
  357.              GOTO QUERY.SHIFT
  358.            END IF
  359.        END IF
  360.  
  361.        IF INSTR(RIGHT.BUTTON.REPLY$,KP$)<>0 THEN
  362.            IF RETURN.CODE%=0 THEN
  363.                RETURN.CODE%=1
  364.              GOTO QUERY.SHIFT
  365.            END IF
  366.        END IF
  367.  
  368. 'Process ERROR
  369.  
  370.        GOSUB QUERY.SOUNDOFF
  371.        GOTO QUERY.PRESS
  372.  
  373. '
  374. QUERY.PRESS.EXTENDED:
  375. 'Process LEFT ARROW KeyPress
  376.  
  377.        IF ASC(RIGHT$(KP$,1))=77 THEN
  378.           IF RETURN.CODE%=1 THEN
  379.               RETURN.CODE%=0
  380.             GOTO QUERY.SHIFT
  381.           ELSEIF RETURN.CODE%=0 THEN
  382.               RETURN.CODE%=1
  383.             GOTO QUERY.SHIFT
  384.           END IF
  385.        END IF
  386. 'Process RIGHT ARROW KeyPress
  387.  
  388.        IF ASC(RIGHT$(KP$,1))=75 THEN
  389.           IF RETURN.CODE%=1 THEN
  390.                RETURN.CODE%=0
  391.              GOTO QUERY.SHIFT
  392.           ELSEIF RETURN.CODE%=0 THEN
  393.               RETURN.CODE%=1
  394.             GOTO QUERY.SHIFT
  395.           END IF
  396.        END IF
  397.  
  398. 'Process ERROR
  399.  
  400.         GOSUB QUERY.SOUNDOFF
  401.         GOTO QUERY.PRESS
  402. '
  403. '
  404. QUERY.GET.PRESS:
  405.        IF BUTTONS%=0 THEN                       'mouse supported?
  406.           GOTO QUERY.GET.INKEY                  'NO
  407.        END IF
  408.  
  409.        CALL MMGETLOC(MOUSECOL,MOUSEROW)         'get mouse cursor location
  410.  
  411.        MOUSECOL=(MOUSECOL\8)+1                  'convert to 80x25 text screen co-ordinates
  412.        MOUSEROW=(MOUSEROW\8)+1
  413.  
  414. QUERY.CHECK.IF.INBOX:
  415.        IF (MOUSEROW<QUERY.ULR) OR (MOUSEROW>QUERY.LRR) THEN
  416.           GOTO QUERY.OUTSIDE.BOX
  417.        END IF
  418.  
  419.        IF (MOUSECOL<QUERY.ULC) OR (MOUSECOL>QUERY.LRC) THEN
  420.           GOTO QUERY.OUTSIDE.BOX
  421.        END IF
  422.  
  423.        IF ((MOUSEROW>=LEFT.ULR) AND (MOUSEROW<=LEFT.LRR))_
  424.                       AND_
  425.           ((MOUSECOL>=LEFT.ULC) AND (MOUSECOL<=LEFT.LRC)) THEN
  426.           GOTO QUERY.CHECK.LEFT.BOX
  427.        END IF
  428.  
  429.        IF ((MOUSEROW>=RIGHT.ULR) AND (MOUSEROW<=RIGHT.LRR))_
  430.                    AND_
  431.           ((MOUSECOL>=RIGHT.ULC) AND (MOUSECOL<=RIGHT.LRC)) THEN
  432.           GOTO QUERY.CHECK.RIGHT.BOX
  433.        END IF
  434.  
  435.        CLICK=-1                                'flush the mouse clicks
  436.        DO WHILE CLICK
  437.           CALL MMCLICK(LFT%,RGT%)              'see if user clicked mouse while in the box
  438.           CLICK=LFT%+RGT%                      'any button clicked
  439.        LOOP
  440.  
  441.        GOTO QUERY.GET.INKEY
  442.  
  443. '
  444. QUERY.CHECK.LEFT.BOX:
  445.        CALL MMCLICK(LFT%,RGT%)              'see if user clicked mouse while in the box
  446.        CLICK=LFT%+RGT%                      'any button clicked
  447.  
  448.        IF CLICK=0 THEN
  449.           GOTO QUERY.GET.INKEY
  450.        END IF
  451.  
  452.        IF RETURN.CODE%=1 THEN                  'simulate Left or Right Cursor press
  453.           KP$=LEFT$(LEFT.BUTTON.REPLY$,1)
  454.        ELSE
  455.           KP$=CHR$(13)
  456.        END IF
  457.  
  458.        RETURN
  459.  
  460. '
  461. QUERY.CHECK.RIGHT.BOX:
  462.        CALL MMCLICK(LFT%,RGT%)              'see if user clicked mouse while in the box
  463.        CLICK=LFT%+RGT%                      'any button clicked
  464.  
  465.        IF CLICK=0 THEN
  466.           GOTO QUERY.GET.INKEY
  467.        END IF
  468.  
  469.        IF RETURN.CODE%=1 THEN                  'simulate Left or Right Cursor press
  470.           KP$=CHR$(13)
  471.        ELSE
  472.           KP$=LEFT$(RIGHT.BUTTON.REPLY$,1)
  473.        END IF
  474.  
  475.        RETURN
  476.  
  477. '
  478. QUERY.OUTSIDE.BOX:
  479.        CALL MMCLICK(LFT%,RGT%)                 'see if user clicked mouse while in the box
  480.        CLICK=LFT%+RGT%                         'any button clicked
  481.  
  482.        IF CLICK THEN
  483.             KP$=CHR$(27)                       'YES, same as pressing ENTER
  484.           RETURN
  485.        END IF
  486.  
  487.        GOTO QUERY.GET.INKEY
  488.  
  489. '
  490. QUERY.GET.INKEY:
  491.        KP$=INKEY$                               'was a keyboard key pressed
  492.  
  493.        IF LEN(KP$)=0 THEN
  494.           GOTO QUERY.GET.PRESS                  'NO
  495.        END IF
  496.  
  497.        RETURN
  498.  
  499. '
  500. QUERY.GET.ORD:
  501.        QUADRANT$=LTRIM$(QUADRANT$)
  502.        QUADRANT$=RTRIM$(QUADRANT$)
  503.  
  504.        COLON.LOC=INSTR(QUADRANT$,":")
  505.  
  506.        IF COLON.LOC=1 THEN
  507.            QUADRANT$="01"+QUADRANT$
  508.            COLON.LOC=3
  509.        END IF
  510.  
  511.        ULR%=VAL(LEFT$(QUADRANT$,COLON.LOC-1))
  512.        IF (ULR%<1) OR (ULR%>24) THEN
  513.           ULR%=2
  514.        END IF
  515.  
  516.        IF COLON.LOC=LEN(QUADRANT$) THEN
  517.           QUADRANT$=QUADRANT$+"00"
  518.        END IF
  519.  
  520.        ULC%=VAL(RIGHT$(QUADRANT$,COLON.LOC+1))
  521.        IF (ULC%<1) OR (ULC%>80) THEN
  522.            GOSUB QUERY.CENTER.ON.THE.LINE
  523.        END IF
  524.  
  525.        QUADRANT.ROW$=STR$(ULR%)
  526.        QUADRANT$="0"+RIGHT$(QUADRANT.ROW$,LEN(QUADRANT.ROW$)-1)+":"
  527.        QUADRANT.COL$=STR$(ULC%)
  528.        QUADRANT$=QUADRANT$+"0"+RIGHT$(QUADRANT.COL$,LEN(QUADRANT.COL$)-1)
  529.  
  530.        ULR%=ULR%+1
  531.  
  532.        LRR=ULR+MSGLINES%+7
  533.        LRC=ULC+MSGLEN%-1
  534.        CCOL=ULC+((LRC-ULC)/2+.5)
  535.        RETURN
  536.  
  537. QUERY.CENTER.ON.THE.LINE:
  538.        TEMP.ULC=40-(MSGLEN%/2)
  539.        IF (ULC<2) THEN
  540.           TEMP.ULC=2
  541.        END IF
  542.  
  543.        ULC=TEMP.ULC
  544.  
  545.        RETURN
  546.  
  547. '
  548. QUERY.SOUNDOFF:
  549.        SOUND 1000,1
  550.        SOUND 1500,2
  551.        SOUND 500,1
  552.        RETURN
  553.  
  554. '
  555. QUERY.DONE:
  556.        MSG.STRING$=""                           'string space cleanup
  557.        MSG$=""
  558.        KP$=""
  559.  
  560.        CALL MMCURSOROFF
  561.        EXIT SUB
  562. END SUB
  563.