Conascii
PBCC example code for Display Screens
Home
MTutor
GradientFill
FB code
FBLoan
TW-Form
JaxGUI
Other DownLoads
PBCC Code
GW Code
Fix 2000/ XP
Text Screen Shots
QB code

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. 
                                                      
                                                                                
  ff = FREEFILE                                                                
  OPEN FILENAMEs$ FOR BINARY AS #ff                                            
    GET$ #ff, 4, y1$ : r1 = VAL(y1$)   'Load addresses
    GET$ #ff, 4, y2$ : r2 = VAL(y2$)
    GET$ #ff, 4, y3$ : c1  = VAL(y3$)
    GET$ #ff, 3, y4$ : c2  = VAL(y4$) 
                                                            
    GET$ #ff, LOF(ff) - 15, pic$            ' Load it into a string
  CLOSE #ff                                         ' minus address numbers 
                                        
  rol  = r2  - r1  + 1                                                       
  colz  = (c2  - c1  + 1) * 2 
                                                                              
  FOR x = 1 TO LEN(pic$)                                                       
    pict$ = pict$ + MID$(pic$, x, 1) + " "  'Make compatible with API
  NEXT x                                                                       
  textputz r1 , c1 , r2 , c2 , pict$        'Put it on the screen      
                                                                               
  pic$ ="" : pict$ = ""                                                        
  y1$="": y2$="": y3$="": y4$="":rol =0: colz =0                               
                                                                               
  SUB TextPutz (r1, c1, r2, c2, Area$)        'Text screen launcher   
    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
                                    

                                   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
    lpReadRegion.xRight = Rside& - 1
    lpReadRegion.xTop = Top& - 1
    lpReadRegion.xBottom = 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