Make your own free website on Tripod.com
| Home | Ruff-In | MTutor | GradientFill | FB code | FBLoan | TW-Form | JaxGUI | Other DownLoads | PBCC Code | GW Code | Fix 2000/ XP | Text Screen Shots | QB code
PBCC example code for Display Screens

ConASCII

Enter subhead content here

                                    POP Files
 
  Like the Screens in DATA, POP files will display in the positions           
  they were created. They are saved to a File instead of the Clipboard.
                                                                                
  To Display a POP file in your PBCC programs, first load it in a String.      
  Only the PBCC POP file Will need the WIN32API.INC, the others don't. 

 The original POP file was created by Jerry Fielden around the  Year 1988 for
a replacement for  BSAVE which would only do Full Screens. The POP file could
be of any size up to full screen.  It would pop to any position of the Screen.
                                                      
                                                                                
   OPEN FILENAMEs$ FOR BINARY AS #ff     '--------------------' P O P     F I L E S
    GET$ #ff, 1, y1$
    GET$ #ff, 1, y2$
    GET$ #ff, 1, x1$
    GET$ #ff, 1, x2$
    GET$ #ff, LOF(ff) - 4, pic$
  CLOSE #ff

    r1  = ASC(y1$)
    r2  = ASC(y2$)
    c1  = ASC(x1$)
    c2  = ASC(x2$)

    rol  = r2  - r1  + 1
    colz  = (c2  - c1  + 1) * 2

     FOR x = 1 TO LEN(pic$)
        pict$ = pict$ + MID$(pic$, x, 1) + " "
     NEXT x
     textputz r1 , c1 , r2 , c2 , pict$

     pic$ ="" : pict$ = ""
     y1$="": y2$="": x1$="": x2$="":rol =0: colz =0

 SUB TextPutz (r1, c1, r2, c2, Area$)             'Text screen launcher for PBCC50 and below.
       LOCAL Size AS DWORD
       LOCAL Buf$
       LOCAL Rectangl AS SMALL_RECT
       Buf$ = Area$
       Size = MAKDWD(c2+1-c1, r2+1-r1)            ' Size of rectangle
       Rectangl.xTop = r1-1                       ' Set Row and column
       Rectangl.xLeft = c1-1                      ' address of all 4 sides
       Rectangl.xBottom = r2-1                    ' of a Rectangle for Read
       Rectangl.xRight = c2-1                     ' or for Write.
       WriteConsoleOutput GETSTDOUT, BYVAL STRPTR(Buf$), BYVAL Size, 0&, Rectangl
       Buf$ = ""
    END SUB

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



The routine below works with the new PBCC60 consoles. Notice that the xTop has been changed to nTop. The Small_Rect TYPE in the New Windows Include files reflexes this and it causes the old routines to not compile in the new PBCC60 console programs.




 SUB TextPutz (r1, c1, r2, c2, Area$)             'Text screen launcher for PBCC60 and above
       LOCAL Size AS DWORD
       LOCAL Buf$
       LOCAL Rectangl AS SMALL_RECT
       Buf$ = Area$
       Size = MAKDWD(c2+1-c1, r2+1-r1)            ' Size of rectangle
       Rectangl.nTop = r1-1                       ' Set Row and column
       Rectangl.nLeft = c1-1                      ' address of all 4 sides
       Rectangl.nBottom = r2-1                    ' of a Rectangle for Read
       Rectangl.nRight = c2-1                     ' or for Write.
       WriteConsoleOutput GETSTDOUT, BYVAL STRPTR(Buf$), BYVAL Size, 0&, Rectangl
       Buf$ = ""
    END SUB                                                       

                                   INCLUDE Files
 
The following is Similar to what Conascii puts in an Include file when you Select PBCC DATA  (*.INC) from Save in the File drop. It appends each SUB of the Screen that you create to the Bottom of the Include File.
 
You can only append 1 screen or area at a time to the Include file. You create a screen and then save it, do another and save it too, one after the other, saving it each time you create one. It's not hard, Conascii does all the work for you, all you have to do is Create and Save.
 
You must first click on the corners of the Area you want to include and than  on Copy at the bottom bar. If this was saved to an Include file named DemoINC.INC, then the PBMAIN example below could use it.
 
DECLARE SUB Putz(Lside&, Rside&, Top&, Bottom&, scr$)
 SUB Putz(Lside&, Rside&, Top&, Bottom&, scr$)
    LOCAL lpReadRegion AS SMALL_RECT, sBuffer AS STRING
    Length& = LEN(scr$)
    FOR x& = 1 TO Length&
      sBuffer = sBuffer + MID$(scr$, X&, 1)+ CHR$(32)
    NEXT x&
    lpReadRegion.xLeft = Lside& - 1    'Use with PBCC50 compiler and lower
    lpReadRegion.xRight = Rside& - 1
    lpReadRegion.xTop = Top& - 1
    lpReadRegion.xBottom = Bottom& - 1
   ' lpReadRegion.nLeft = Lside& - 1    'Use with PBCC60 compiler and higher    
   ' lpReadRegion.nRight = Rside& - 1
   ' lpReadRegion.nTop = Top& - 1
   ' lpReadRegion.nBottom = Bottom& - 1

    WriteConsoleOutPut GetStdHandle(%STD_OUTPUT_HANDLE), BYVAL STRPTR(sBuffer), _
    BYVAL MAKDWD((Rside&+1)-Lside&, (Bottom&+1)-Top&), BYVAL 0&, lpReadRegion
    scr$ = ""
 END SUB
 
 DECLARE SUB Exits
 SUB Exits
    FOR x& = 1 TO DATACOUNT : scr$ = scr$ + READ$(x&) :  NEXT x&
    Putz  2, 20, 10, 16, scr$
    EXIT SUB
DATA "
²@±@°@ @ @ @ @ @ @ @ @ @ @ @ @ @°@±@²@"
DATA "
²@±@°@ @ O OEO OXO OIO OTO O @ @°@±@²@"
DATA "
²@±@°@ @ @ @ @ @ @ @ @ @ @ @ @ @°@±@²@"
DATA "
²@±@°@AOrOeO OyOoOuO OsOuOrOeO?O°@±@²@"
DATA "
²@±@°@ @ @ @ @ @ @ @ @ @ @ @ @ @°@±@²@"
DATA "
²@±@°@ ¤Y¤E¤S¤ ¤ @ @ @ @ ÏNÏOÏ Ï°@±@²@"
DATA "
²@±@°@ @ @ @ @ @ @ @ @ @ @ @ @ @°@±@²@"
END SUB

DECLARE SUB CreateParent
 SUB CreateParent
    FOR x& = 1 TO DATACOUNT : scr$ = scr$ + READ$(x&) :  NEXT x&
    Putz  41, 63, 4, 8, scr$
    EXIT SUB
DATA "
²@±@Ú@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@¿@±@²@"
DATA "
²@±@³@COrOeOaOtOeO OtOhOeO OPOaOrOeOnOtO³@±@²@"
DATA "
²@±@³@fOiOrOsOtO OwOhOiOcOhO OhOaOsO OaO³@±@²@"
DATA "
²@±@³@GOrOiOdO OtOoO OfOoOlOlOoOwO.O.O O³@±@²@"
DATA "
²@±@À@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ä@Ù@±@²@"
END SUB

DECLARE SUB ClickCorners
 SUB ClickCorners
    FOR x& = 1 TO DATACOUNT : scr$ = scr$ + READ$(x&) :  NEXT x&
    Putz  27, 56, 6, 16, scr$
    EXIT SUB
DATA "²±°ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿°±²"
DATA "²±°³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³°±²"
DATA "²±°³ ³ You must click ³ ³°±²"
DATA "²±°³ ³ on two diagonal ³ ³°±²"
DATA "²±°³ ³ corners before ³ ³°±²"
DATA "²±°³ ³ this function ³ ³°±²"
DATA "²±°³ ³ will work. Click ³ ³°±²"
DATA "²±°³ ³ on both corners ³ ³°±²"
DATA "²±°³ ³ again. ³ ³°±²"
DATA "²±°³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³°±²"
DATA "²±°ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ°±²"
END SUB
 
The Above SUBs contains unsupported Characters by this Site. It is here to show you what it would look like in your INCLUDE file. The Include file that Conascii creates doesn't have the missing Characters.
'----------------------------------------------------
'End of Include file.

The following is an Example of a PBMAIN that can call these screens. It's saved seperatly from the INCLUDE file.

 

#COMPILE EXE

#REGISTER NONE

#INCLUDE "c:\pbcc30\WinAPI\win32api.inc"  'Correct address if different 
#INCLUDE "DemoINC.INC"    'Would have to be in same directory 
FUNCTION PBMAIN
   ClickCorners
   SLEEP 3000
   CreateParent
   SLEEP 3000
   Exits
   SLEEP 3000
END FUNCTION