Category : BASIC Source Code
Archive   : DNALIB40.ZIP
Filename : DBLBOX.BAS

 
Output of file : DBLBOX.BAS contained in archive : DNALIB40.ZIP
DECLARE SUB LineEdit(Allow$,Text$,Mouse%,MouseRow%,MouseCol%,Fill%,Row%,Col%,EditKey%,Attr%)
DECLARE SUB Popwind(Title$,Toprow%,Leftcolumn%,Bottomrow%,Rightcolumn%,Attr%,Shadow%,Border%)
DECLARE SUB RestoreScreen(ScreenID$,TopRow%,LeftColumn%)
DECLARE SUB SaveScreen(ScreenID$,TopRow%,LeftColumn%,BottomRow%,RightColumn%,Shadow%)
DECLARE SUB CalcByte(Attr%,LowByte%,HiByte%)
DECLARE SUB Clicked(Rgt%,Lft%,Row%,Col%)
DECLARE SUB HideCursor()
DECLARE SUB ShowCursor()

SUB DoubleBox(PromptOne$,PromptTwo$,TextOne$,TextTwo$,Allow$,Mouse%,Editkey%,Fill%,Location%,ButtonAttr%,TextAttr%,Attr%,Shadow%,Border%)PUBLIC

CalcByte Attr%,FGround%,BGround%
CalcByte ButtonAttr%,BtFG%,BtBG%

IF Mouse% THEN HideCursor

IF LEN(PromptOne$) > LEN(PromptTwo$) THEN
Prompt$ = PromptOne$
ELSE
Prompt$ = PromptTwo$
END IF

Finished% = 0

LeftColumn% = 40 - ((LEN(Prompt$) + LEN(TextOne$) + 5) \ 2)
RightColumn% = LeftColumn% + (LEN(Prompt$) + LEN(TextOne$) + 4)

SaveScreen DbScreen$,Location%,LeftColumn%,Location% + 7,RightColumn%,Shadow%

Popwind Title$,Location%,LeftColumn%,Location% + 7,RightColumn%,Attr%,Shadow%,Border%

COLOR FGround%,BGround%
LOCATE Location% + 1,LeftColumn% + 2,0
PRINT PromptOne$;
LOCATE Location% + 3,LeftColumn% + 2,0
PRINT PromptTwo$;

Row% = Location% + 5
Col% = LeftColumn% + 3

IF Mouse% THEN
COLOR FGround%,BGround%
LOCATE Location%,LeftColumn% + 2,0
PRINT CHR$(91,254,93);
END IF

COLOR BtFG%,BtBG%
LOCATE Row%, Col%,0
PRINT " Ok ";
COLOR 0,BGround%
LOCATE Row%, Col% + 4,0
PRINT "Ü";
COLOR 0,BGround%
LOCATE Row% + 1,Col% + 1,0
PRINT "ßßßß";

COLOR BtFG%,BtBG%
LOCATE Row%,Col% + 9,0
PRINT " Esc ";
COLOR 0,BGround%
LOCATE Row%,Col% + 14,0
PRINT "Ü";
COLOR 0,BGround%
LOCATE Row% + 1,Col% + 10,0
PRINT "ßßßßß"

DO

MouseRow% = 0
MouseCol% = 0

LineEdit Allow$,TextOne$,Mouse%,MouseRow%,MouseCol%,Fill%,Location% + 1,LeftColumn% + LEN(Prompt$) + 3,EditKey%,TextAttr%

IF Mouse% THEN
IF Editkey% = -255 THEN
IF MouseRow% <> (Location% + 3) THEN GOTO CheckMouse
END IF
END IF

IF Editkey% = 27 THEN GOTO KeyExit

MouseRow% = 0
MouseCol% = 0

LineEdit Allow$,TextTwo$,Mouse%,MouseRow%,MouseCol%,Fill%,Location% + 3,LeftColumn% + LEN(Prompt$) + 3,EditKey%,TextAttr%

CheckMouse:

IF Editkey% = 255 THEN Editkey% = 0

IF Mouse% THEN 'stop here and check if exit was with mouse
ShowCursor
IF Row% = MouseRow% THEN
SELECT CASE MouseCol%

CASE Col% TO Col% + 3
Editkey% = 13
Finished% = 1

CASE Col% + 9 TO Col% + 13
Editkey% = 27
Finished% = 1

END SELECT
ELSEIF Location% = MouseRow% THEN
IF MouseCol% = LeftColumn% + 3 THEN
Editkey% = 27
Finished% = 1
END IF
ELSE
IF Editkey% = 13 OR Editkey% = 27 THEN
Finished% = 1
END IF
END IF
ELSE
IF Editkey% = 13 OR Editkey% = 27 THEN Finished% = 1
END IF

LOOP UNTIL Finished%

KeyExit:

SELECT CASE Editkey%

CASE 13 'Ok
IF Mouse% THEN HideCursor
COLOR FGround%,BGround%
LOCATE Row%,Col%,0
PRINT " ";
LOCATE Row% + 1,Col% + 1,0
PRINT " ";
COLOR BtFG%,BtBG%
LOCATE Row%,Col% + 1,0
PRINT " Ok "

CASE 27 'Esc
IF Mouse% THEN HideCursor
COLOR FGround%,BGround%
LOCATE Row%,Col% + 9,0
PRINT " ";
LOCATE Row% + 1,Col% + 10,0
PRINT " ";
COLOR BtFG%,BtBG%
LOCATE Row%,Col% + 10,0
PRINT " Esc "

END SELECT

IF Mouse% THEN ShowCursor
DELAY .5
IF Mouse% THEN HideCursor
RestoreScreen DbScreen$,Location%,LeftColumn%

END SUB



  3 Responses to “Category : BASIC Source Code
Archive   : DNALIB40.ZIP
Filename : DBLBOX.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/