Category : BASIC Source Code
Archive   : GUI200.ZIP
Filename : REGISTER.BAS

 
Output of file : REGISTER.BAS contained in archive : GUI200.ZIP


$COMPILE EXE
$ALIAS DATA AS "_DATA"
$DYNAMIC
DEFINT A-Z
$INCLUDE "PBGUI200.BI"
$LINK "PBGUI200.PBL"

DIM AllBlack (0:15) AS SHARED INTEGER,_
AllColor (0:15) AS SHARED INTEGER
REDIM TestState(10) AS SHARED BYTE
'***** Fill the Arrays

FOR X = 0 TO 15
AllBlack(X) = 0
AllColor(X) = X
NEXT X
'***** Set the graphics mode

SCREEN 12

WindowInit
ColorInit
MouseInit


MouseHide
PALETTE USING AllBlack(0)
Shadow = %FALSE
ShadowColor = 3
Raised = %TRUE
RaisedColor = 1
LoadWindow "register.000"


'***** The following lines were used to create the window then commented
'***** out and subsituted with LoadWindow.


$IF 0
NextWin = WindowNext
CharSpace=3
Bold=%FALSE
Shadow = %TRUE
FontLoaded=LoadFont("mark18")
IF FontLoaded = 0 THEN
screen 0
BEEP:BEEP:BEEP
Print "NO FONT FIND"
END IF





WOT.handle = NextWin
WOT.row1 = 8
WOT.col1 = 8
WOT.row2 = 369
WOT.col2 = 629
WOT.LightColor = 1
WOT.BackColor = 2
WOT.DarkColor = 3
WOT.TextColor = 5
WOT.BorderColor = 3
WOT.Title = "PBGUI TOOLKIT REGISTRATION" + CHR$(0)
WOT.Savebkgd = %FALSE
GUILib %MakeWindow
CharSpace = 2
ThreeDBox %UP,20,10,240,360
ThreeDBox %UP,20,380,140,600
ThreeDLine %UP,%HORZ,45,380,220
ThreeDLine %UP,%VERT,47,490,92
THreeDLine %UP,%HORZ,75,380,109
THreeDLine %UP,%HORZ,75,491,108

Panel %UP,150,380,205,600,1
ThreeDBox %DOWN,270,110,290,470
'Panel %UP,270,130,290,490,1
ShadowColor = 1
Shadow = %FALSE

Raised = %FALSE
Shadow = %TRUE
ShadowColor = 1
BOT.handle = 1
BOT.ButtonType = 1
BOT.state = %Active
BOT.row1 = 215
BOT.row2 = 240
BOT.TextColor = 6
BOT.BackColor = 2
BOT.LightColor = 1
BOT.DarkColor = 3
BOT.col1 = 500
BOT.col2 = 600
BOT.FontID.Filename="dub10b"
BOT.Text = "QUIT"+CHR$(0)
GUILib %MakeButton

BOT.handle = 2
BOT.ButtonType = 1
BOT.state = %Active

BOT.row1 = 215
BOT.row2 = 240
BOT.TextColor = 9
BOT.BackColor = 2
BOT.LightColor = 1
BOT.DarkColor = 3
BOT.col1 = 380
BOT.col2 = 480
BOT.FontID.Filename="dub10b"
BOT.Text = "PRINT"+CHR$(0)
GUILib %MakeButton



FontLoaded = LoadFont("dub10b")

Shadow = %FALSE
ShadowColor = 3
Raised = %TRUE
RaisedColor = 1
labelColor = 9

BOT.handle = 3
BOT.ButtonType = %RadioButton
BOT.state = %NotActive
BOT.row1 = 90
BOT.col1 = 410
BOT.TextColor = 6
BOT.Text = "360K"+CHR$(0)
GUILib %MakeButton


BOT.handle = 4
BOT.state = %NotActive
BOT.col1 = 520
BOT.Text = "720K"+CHR$(0)
GUILib %MakeButton


BOT.handle = 5
BOT.state = %NotActive
BOT.row1 = 110
BOT.col1 = 410
BOT.Text ="1.2M"+CHR$(0)
GUILib %MakeButton


BOT.handle = 6
BOT.state = %Active
BOT.Text = "1.4M"+CHR$(0)
BOT.col1 = 520
GUILib %MakeButton
INCR BOT.row1,30




WindowPrint 24,20,"Name"+CHR$(0),LabelColor,0
'***** Create an EditField
EFOT.handle = 1
EFOT.state = %Active
EFOT.Length = 40


EFOT.text = SPACE$(EFOT.Length)+CHR$(0)
EFOT.row =40
EFOT.col = 17
EFOT.ForeColor = 15
EFOT.BackColor = 8
GUILib %MakeEditField


INCR EFOT.row,24
WindowPrint EFOT.row,20,"Address 1"+CHR$(0),LabelColor,0

INCR EFOT.row, 16

EFOT.handle = 2
GUILib %MakeEditField

INCR EFOT.row, 24
WindowPrint EFOT.row,20,"Address 2"+CHR$(0),LabelColor,0

INCR EFOT.row,16

EFOT.handle = 3
GUILib %MakeEditField
INCR EFOT.row,24
WindowPrint EFOT.row,20,"Address 3"+CHR$(0),LabelColor,0

INCR EFOT.row,16

EFOT.handle = 4
EFOT.Length = 40
EFOT.text = SPACE$(EFOT.Length)+CHR$(0)
GUILib %MakeEditField
INCR EFOT.row ,24
WindowPrint EFOT.row,20,"Address 4"+CHR$(0),LabelColor,0

INCR EFOT.row ,16

EFOT.handle = 5
EFOT.Length = 40
EFOT.text = SPACE$(EFOT.Length)+CHR$(0)
GUILib %MakeEditField
INCR EFOT.col,EFOT.Length * 8 + 32

FontLoaded = LoadFont("DUB12B")
WindowPrint 25,450,"Disk Size"+CHR$(0),6,0

WindowPrint 55,400," 5 1/4 3 1/2"+CHR$(0),6,0
Raised = %FALSE






FontLoaded = LoadFont("dub8")
Raised = %FALSE
Shadow = %FALSE
WindowPrint 160,385," Registration Fee $40.00"+CHR$(0),0,0
WindowPrint 180,385," Outside USA add $5.00"+CHR$(0),0,0
FontLoaded = LoadFont("dub10")
WindowPrint 274,120, "PBGUI TOOLKIT 2.00 copyright 1993 James C. Fuller"+CHR$(0),0,0


Raised = %TRUE
$ENDIF



MousePosition 430,420
NumberOfEditFields = 5
ExitFlag = 0
EditField = 1
Button2State = 0
DiskState = 6
Palette Using AllColor(0)
MouseShow
WHILE NOT ExitFlag
GetEvent EditField
SELECT CASE Event(0)
CASE -63
MouseHide
SaveWindow "REGISTER.000"
MouseShow
screen 1
end

CASE 1 'Button Event
SELECT CASE Event(1)
CASE 1
ExitFlag = %TRUE

CASE 2
PrintForm DiskState
CASE 3 TO 6
ButtonSetState DiskState,%NotActive
DiskState = Event(1)
ButtonSetState DiskState,%Active

END SELECT

CASE 2 '***** Edit Event ******
IF EditFieldGetState(Event(2)) = %Active THEN EditField = Event(2)
CASE 3 TO 4 '***** Enter, or TAB ********
DO
INCR EditField
IF EditField > NumberOfEditFields THEN EditField = 1
IF EditFieldGetState(EditField) = %Active THEN EXIT DO
LOOP
END SELECT
WEND

CloseWindow


SUB PrintForm(DiskSize)
Ok=CheckPrinter
If Ok= 0 then
CharSpace = 2
Raised = %FALSE
Shadow = %TRUE
ShadowColor = 0
MBDT.BoxLightColor = 1
MBDT.BoxBackColor = 2
MBDT.BoxDarkColor = 3
MBDT.BoxTextColor = 6
MBDT.BoxBorderColor = 3
MBDT.ButBackColor = 2
MBDT.ButLightColor = 1
MBDT.ButDarkColor = 3
MBDT.ButTextColor = 13
MBDT.FontID.FileName = "DUB14B"
MBDT.ButOneText = "RETRY" +CHR$(0)
MBDT.ButTwoText = "QUIT" +CHR$(0)

REDIM message(1 TO 1) as string
Message(1) = "Printer Has Failed"

DO
BEEP:BEEP
WhatToDo = MessageBox(Message())
IF WhatToDo = 1 THEN
Ok = CheckPrinter
IF ISTRUE Ok THEN EXIT DO
ELSE
END
END IF

LOOP
Shadow = %FALSE
ShadowColor = 3
Raised = %TRUE




END IF

LPRINT
LPRINT
LPRINT
LPRINT" <<<< PBGUI TOOLKIT 2.00 REGISTRATION FORM >>>>"
LPRINT
LPRINT" ================================================================"
LPRINT
LPRINT" The PBGUI TOOLKIT is priced at $40.00 payable to: James C. Fuller"
LPRINT" Outside U.S.A. Please add $5.00."
LPRINT" All checks must be in U.S. currency drawn on U.S. banks. If"
LPRINT" outside the U.S. please use an international money order."
LPRINT
LPRINT" ================================================================"
LPRINT" Mailing Address:"
LPRINT
FOR x = 1 to 5
LPRINT TAB(20) GetEditField(x)
NEXT x

LPRINT

SELECT CASE DiskSize

CASE 3
LPRINT" DISK SIZE: 5 1/4"+CHR$(34)+" 360K"
CASE 4
LPRINT" DISK SIZE: 3 1/2"+CHR$(34)+" 720K"
CASE 5
LPRINT" DISK SIZE: 5 1/4"+CHR$(34)+" 1.2M"
CASE 6
LPRINT" DISK SIZE: 3 1/2"+CHR$(34)+" 1.4M"

END SELECT
LPRINT" ================================================================"
LPRINT




LPRINT" Please mail this form to :"
LPRINT
LPRINT TAB(20)"James C. Fuller"
LPRINT TAB(20)"59 White Birch Estates"
LPRINT TAB(20)"Fort Edward, NY 12828-9248
LPRINT
LPRINT" ================================================================"
LPRINT" Benefits of Registration:"
LPRINT
LPRINT" My Copyright message removed"
LPRINT
LPRINT" 50+ More Fonts."
LPRINT
LPRINT" First to be notified of Font converter when completed"
LPRINT
LPRINT" Low upgrade price for the deluxe version of the toolkit to be"
LPRINT" released this fall."
LPRINT
LPRINT
LPRINT
LPRINT" COMMENTS:
LPRINT
LPRINT" ________________________________________________________________"
LPRINT
LPRINT" ________________________________________________________________"
LPRINT
LPRINT" ________________________________________________________________"
LPRINT
LPRINT" ________________________________________________________________"
LPRINT
LPRINT" ________________________________________________________________"
LPRINT
LPRINT" ________________________________________________________________"
LPRINT
LPRINT" ________________________________________________________________"

LPRINT CHR$(12)
END SUB

FUNCTION CheckPrinter%
!xor ax,ax
!mov ah,2
!mov dx,0
!int &H17
!cmp ah,&H90
!jnz NotReady
CheckPrinter% = -1
EXIT FUNCTION
NotReady:
CheckPrinter% = 0
END FUNCTION