Announcement

Collapse
No announcement yet.

QBOX

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • QBOX

    Is there a way to get a box with a double border using QBOX
    as opposed to the single border?

    Thank you.

    Robert

    ------------------

  • #2
    Yes, replace the DATA statements in QBox.inc:
    regards, Ian Cairns
    Code:
     SUB BoxAsm(Box.Address)
    '====================
     SHARED Wndow()
      REDIM WNDOW(270)
      WhereAt& = VARSEG(Wndow(0))
      DEF SEG = WhereAt&
      Box.Address = VARPTR(Wndow(0))
      RESTORE windhex:
      FOR i% = 0 TO 269
         READ D$: POKE i%, VAL("&H" + D$)
      NEXT
    
     windhex:
    'ÄÄÄÄÄÄÄÄ
    DATA 55,8B,EC,83,EC,E,53,51,6,57,B9,7,0,BF,0,0,8B,5B,6,8B,7,48,89,43,F2,47,47
    DATA E2,F3,FF,46,F6,FF,46,F4,FF,46,F2,BB,0,B0,A1,10,0,25,30,0,3D,30,0,74,3,BB
    DATA 0,B8,8E,C3,8B,5E,FE,B8,A0,0,F7,E3,8B,5E,FC,D1,E3,3,C3,8B,F8,57,8B,46,F8
    DATA 8B,5E,FC,2B,C3,40,8B,D8,53,8B,46,FA,8B,56,FE,2B,C2,40,8B,C8,51,BA,0,0,8A
    DATA 66,F6,B0,20,83,7E,F4,0,74,5,B0,CD,BA,1,0,51,8B,CB,83,7E,F4,0,74,8,50,B0
    DATA BA,AB,83,E9,1,58,F3,AB,83,7E,F4,0,74,8,50,83,EF,2,B0,BA,AB,58,83,FA,0,75
    DATA E,83,7E,F2,0,74,8,50,B0,8,47,AA,4F,4F,58,2B,FB,2B,FB,81,C7,A0,0,59,B0,20
    DATA 83,7E,F4,0,74,7,83,F9,2,75,2,B0,CD,BA,0,0,E2,AF,83,7E,F2,0,74,B,8B,CB,B0
    DATA 8,83,C7,2,47,AA,E2,FC,83,7E,F4,0,74,27,59,5B,5F,B0,C9,AB,3,FB,3,FB,83,EF
    DATA 4,B0,BB,AB,50,B8,A0,0,49,F7,E1,3,F8,58,83,EF,2,B0,BC,AB,2B,FB,2B,FB,B0
    DATA C8,AB,5F,7,59,5B,8B,E5,5D,CA,E
    
    END SUB
    ------------------
    [email protected]
    :) IRC :)

    Comment


    • #3
      Ian- Shouldn't that work in a similar fashion to QBOX except it
      puts out a double line instead of a single line?

      I think I may be using it wrong. I compiled it, and it compiled
      just fine. Then I compiled it as a PBU file. It compiled just
      fine. (I don't know how to make an INC file yet.)

      I named it QBOX2 to separate it from the original. I linked it
      using $LINK. Compiling it at this point yields an error.

      I *think* I have your example copied correctly, but that may be
      my problem.

      Here is the partial code. (I hope I am not displaying anything
      I should not.)
      ------------------------------------------------------
      ' Make screen for CEMETERY displaying of data here


      $CPU 8086 'make compatible with XT systems
      $LIB ALL OFF 'turn off all PowerBASIC libraries
      '$ERROR ALL OFF 'turn off all PowerBASIC error checking
      $OPTIMIZE SIZE 'optimize for smaller code
      $COMPILE EXE 'compile to an executable
      $link "c:\pb\mousunit.pbu"
      $link "c:\pb\qbox2.pbu" 'the new QBOX routine
      $include "c:\pb\example\pb35.inc"


      SUB PString(BYVAL CursorRow%,BYVAL CursorColumn%,BYVAL PRTSTR$,FGC%,BGC%)
      LOCAL S%,P%,L%,ATTRIBUTE%
      ATTRIBUTE%=FGC%+(BGC%*16)
      S%=STRSEG(PRTSTR$)
      P%=STRPTR(PRTSTR$)
      L%=LEN(PRTSTR$)
      !MOV AX,&H1003
      !MOV BL,0 ; turn blink bit off
      !INT &H10
      !PUSH BP
      !MOV AH,&H13
      !MOV AL,0
      !MOV BH,0
      !MOV BL,ATTRIBUTE%
      !MOV CX,L%
      !MOV DH,CursorRow%
      !DEC DH
      !MOV DL,CursorColumn%
      !DEC DL
      !MOV ES,S%
      !MOV BP,P%
      !INT &H10
      !POP BP
      END SUB

      ' SUBROUTINES all work presently, the subroutines display data,
      ' I took them out to make this a shorter post. -Robert


      Main:
      TitleBar
      QFILL 2,1,25,80, 32,18
      QBOX 2,33,22,47,25,0
      QBOX2 4,4,5,6,20,0 '<--- This IS the correct way to use it, right?
      Cemetery
      Ccode
      Address1
      Address2
      City
      County
      State
      ZipCode
      Phone
      Fax
      Unid
      Entered
      Driving
      Ceid
      end


      ------------------


      Thank you, Ian.
      Robert



      [This message has been edited by Robert Carneal (edited April 26, 2003).]

      Comment


      • #4
        Robert,
        You should be able to take the original .inc file and add
        the routine to it. Rename the new routine to something like
        SUB BoxAsmDouble(Box.Address)
        ...
        ...
        END SUB

        and leave the original routine in place for when you want single
        lines. You can't compile only that routine in a separate PBU because
        it works with the other functions in the 'include' file.

        I tested it only with the demo BAS file included with the QBOX.Zip
        file.
        I don't write much in DOS anymore.

        regards, Ian Cairns

        ------------------
        [email protected]
        :) IRC :)

        Comment


        • #5
          Thank you. Writing DOS applications really is a dying art.

          I should get some Windows programming training, but as long
          as I am kept busy writing dos programs- I keep putting it off.

          My mistake was I compiled the code. After seeing your post, I
          went toa backup and restored the file. Now I have it working
          right, I think! I need to torture test it to find out.

          Thank you, again Ian.

          Robert

          ------------------

          Comment


          • #6
            I agree that writing 'Applications' in DOS is a dying art. I still use
            PB3.2 DOS for a lot of quick and dirty data manipulation. I still have
            my old copy of PB/Vision for doing GUI's in DOS. Although it has a steep
            learning curve, the applications you can write with it are great. If you
            are using the most recent version of PB DOS, I would recommend PB/Vision
            to you. Can't beat what you get for the price.

            PS. forgot to remind you of what you already know.
            You'll have to label the separate data statements
            and do a 'Restore [label|line number]' in the SUB.

            regards,
            Ian Cairns

            ------------------
            [email protected]
            :) IRC :)

            Comment

            Working...
            X