home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / dnalib7a.zip / DNADEMO.BAS < prev    next >
BASIC Source File  |  1994-05-16  |  41KB  |  1,406 lines

  1. $INCLUDE "DNALIB.INC"
  2. $LINK "DNALIB.PBL"
  3.  
  4. IF MouseThere% THEN Mouse% = 1
  5. '----------------------------------------------------------------------------
  6. DIM FDirectory$(500)
  7. DIM DemoName$(101)
  8. DIM About$(15)
  9. DIM Menu$(12)
  10. DIM Info$(12)
  11. DIM TempMessage$(7)
  12. '----------------------------------------------------------------------------
  13. HorzMenu$(1) = "@Miscellaneous"
  14. HorzMenu$(2) = "@Editing"
  15. HorzMenu$(3) = "Sc@reen"
  16. HorzMenu$(4) = "@Input"
  17. HorzMenu$(5) = "@Answer"
  18. HorzMenu$(6) = "@Help"
  19. '----------------------------------------------------------------------------
  20. VertMenu1$(1) = "Area@CLS"
  21. VertMenu1$(2) = "Poke@Area"
  22. VertMenu1$(3) = "_"
  23. VertMenu1$(4) = "@Noise"
  24. VertMenu1$(5) = "_"
  25. VertMenu1$(6) = "@Moveable Window"
  26. VertMenu1$(7) = "@Percentage"
  27. VertMenu1$(8) = "@Scroll"
  28.  
  29. VertInfo1$(1) = "Clear an area of the Screen"
  30. VertInfo1$(2) = "Poke an area of the Screen"
  31. VertInfo1$(4) = "Make some noise"
  32. VertInfo1$(6) = "Move a window around the Screen"
  33. VertInfo1$(7) = "Show some activity"
  34. VertInfo1$(8) = "Scroll a message in both directions"
  35. '----------------------------------------------------------------------------
  36. VertMenu2$(1) = "@Line Editing Demo"
  37. VertMenu2$(2) = "_"
  38. VertMenu2$(3) = "Data @Entry"
  39. VertMenu2$(4) = "_"
  40. VertMenu2$(5) = "@Full Screen Text Editor"
  41. VertMenu2$(6) = "_"
  42. VertMenu2$(7) = "@Single Edit Box"
  43. VertMenu2$(8) = "@Double Edit Box"
  44.  
  45. VertInfo2$(1) = "Demo of LineEdit Routine"
  46. VertInfo2$(3) = "Multi field Data Entry Routine"
  47. VertInfo2$(5) = "Demo of DNA Write Text Editor"
  48. VertInfo2$(7) = "Demo of Single Edit Box Routine"
  49. VertInfo2$(8) = "Demo of Double Edit Box Routine"
  50. '----------------------------------------------------------------------------
  51. VertMenu3$(1) = "@Popwind"
  52. VertMenu3$(2) = "Save & @Restore"
  53. VertMenu3$(3) = "_"
  54. VertMenu3$(4) = "@Browse"
  55. VertMenu3$(5) = "@Dialog"
  56. VertMenu3$(6) = "Scroll @Box"
  57. VertMenu3$(7) = "@Virtual Box"
  58.  
  59. VertInfo3$(1) = "Demo of Popwind Routine"
  60. VertInfo3$(2) = "Demo of SaveRest Routine"
  61. VertInfo3$(4) = "Demo of Browse Routine"
  62. VertInfo3$(5) = "Demo of Dialog Routine"
  63. VertInfo3$(6) = "Demo of Scroll Box Routine"
  64. VertInfo3$(7) = "Demo of Virtual Box Routine"
  65. '----------------------------------------------------------------------------
  66. VertMenu4$(1) = "@CalcBox"
  67. VertMenu4$(2) = "_"
  68. VertMenu4$(3) = "@Lotus"
  69. VertMenu4$(4) = "@ScrollMenu"
  70. VertMenu4$(5) = "_"
  71. VertMenu4$(6) = "@DirectoryBox"
  72. VertMenu4$(7) = "@PickBox"
  73. VertMenu4$(8) = "@WriteToBox"
  74.  
  75. VertInfo4$(1) = "Demo of CalcBox Function"
  76. VertInfo4$(3) = "Demo of Lotus Style Menu"
  77. VertInfo4$(4) = "Demo of Scrolling Menu with Hot keys"
  78. VertInfo4$(6) = "Recursive Directory Routine"
  79. VertInfo4$(7) = "Demo of Full screen file selection"
  80. VertInfo4$(8) = "Insert a fully pathed file name"
  81. '----------------------------------------------------------------------------
  82. VertMenu5$(1) = "@Ask"
  83. VertMenu5$(2) = "@Maybe"
  84. VertMenu5$(3) = "@YesNo"
  85. VertMenu5$(4) = "_"
  86. VertMenu5$(5) = "@Question"
  87.  
  88. VertInfo5$(1) = "Demo of Ask Routine"
  89. VertInfo5$(2) = "Demo of Maybe Routine"
  90. VertInfo5$(3) = "Demo of YesNo Function"
  91. VertInfo5$(5) = "Multiple Answer Routine"
  92. '----------------------------------------------------------------------------
  93. VertMenu6$(1) = "@Help"
  94. VertMenu6$(2) = "@Future"
  95. VertMenu6$(3) = "About @DNALIB"
  96. VertMenu6$(4) = "_"
  97. VertMenu6$(5) = "@Quit"
  98.  
  99. VertInfo6$(1) = "Information on HELP System"
  100. VertInfo6$(2) = "Plans for Future"
  101. VertInfo6$(3) = "Information About DNA Library"
  102. VertInfo6$(5) = "Quit DNALIB & Demo of Ask Routine"
  103. '----------------------------------------------------------------------------
  104. HelpTextColor% = 14
  105. HelpAttr% = 79
  106.  
  107. SCREEN 0
  108.  
  109. TopRow% = 1
  110. Marker% = 99
  111. COLOR 0,3
  112. LOCATE 3,1,0
  113. A$ = REPEAT$(80," DNA for PowerBASIC 3")
  114. PRINT A$
  115. COLOR 14,0
  116. LOCATE 2,1,0
  117. PRINT STRING$(80,205);
  118. LOCATE 24,1,0
  119. PRINT STRING$(80,205);
  120. COLOR 0,7
  121. LOCATE 25,1,0
  122. PRINT SPACE$(80);
  123.  
  124. DO
  125.  
  126. HORIZONTALMENU HorzMenu$(),BarSave$,HiLight%,Mouse%,HPointer%,4,112,15,TopRow%,5,Marker%
  127.  
  128. SELECT CASE HPointer%
  129.   CASE 1  'Miscellaneous
  130.     VERTICALMENU VertMenu1$(),VertInfo1$(),VRtrn$,BarSave$,Mouse%,4,HelpTextColor%,HelpAttr%,15,TopRow%,Marker%,HPointer%,112,1,1
  131.     IF LEN(VRtrn$) THEN
  132.       SELECT CASE VRtrn$
  133.         CASE "AreaCLS"
  134.           GOSUB AreaCLSDemo
  135.         CASE "PokeArea"
  136.           GOSUB PokeAreaDemo
  137.         CASE "Noise"
  138.           GOSUB NoiseDemo
  139.         CASE "Moveable Window"
  140.           GOSUB MoveableWinDemo
  141.         CASE "Percentage"
  142.           GOSUB PercentageDemo
  143.         CASE "Scroll"
  144.           GOSUB ScrollDemo
  145.       END SELECT
  146.     END IF
  147.   CASE 2  'Edit
  148.     VERTICALMENU VertMenu2$(),VertInfo2$(),VRtrn$,BarSave$,Mouse%,4,HelpTextColor%,HelpAttr%,15,TopRow%,Marker%,HPointer%,112,1,1
  149.     IF LEN(VRtrn$) THEN
  150.       SELECT CASE VRtrn$
  151.         CASE "Line Editing Demo"
  152.           GOSUB LineEditDemo
  153.         CASE "Data Entry"
  154.           GOSUB DataEntry
  155.         CASE "Full Screen Text Editor"
  156.           GOSUB DNAWriteDemo
  157.         CASE "Single Edit Box"
  158.           GOSUB SingleEditBox
  159.         CASE "Double Edit Box"
  160.           GOSUB DoubleEditBox
  161.       END SELECT
  162.     END IF
  163.   CASE 3  'Screen
  164.     VERTICALMENU VertMenu3$(),VertInfo3$(),VRtrn$,BarSave$,Mouse%,4,HelpTextColor%,HelpAttr%,15,TopRow%,Marker%,HPointer%,112,1,1
  165.     IF LEN(VRtrn$) THEN
  166.       SELECT CASE VRtrn$
  167.         CASE "Popwind"
  168.           GOSUB PopwindDemo
  169.         CASE "Save & Restore"
  170.           GOSUB SaveRestoreDemo
  171.         CASE "Browse"
  172.           GOSUB BrowseDemo
  173.         CASE "Dialog"
  174.           GOSUB DialogDemo
  175.         CASE "Scroll Box"
  176.           GOSUB ScrollBoxDemo
  177.         CASE "Virtual Box"
  178.           GOSUB VirtualBoxDemo
  179.       END SELECT
  180.     END IF
  181.   CASE 4  'Help
  182.     VERTICALMENU VertMenu4$(),VertInfo4$(),VRtrn$,BarSave$,Mouse%,4,HelpTextColor%,HelpAttr%,15,TopRow%,Marker%,HPointer%,112,1,1
  183.     IF LEN(VRtrn$) THEN
  184.       SELECT CASE VRtrn$
  185.     CASE "CalcBox"
  186.           GOSUB CalcBoxDemo
  187.     CASE "Lotus"
  188.           GOSUB LotusDemo
  189.     CASE "ScrollMenu"
  190.           GOSUB ScrollMenuDemo
  191.     CASE "DirectoryBox"
  192.           GOSUB DirectoryBoxDemo
  193.     CASE "PickBox"
  194.           GOSUB PickBoxDemo
  195.     CASE "WriteToBox"
  196.           GOSUB WriteToBoxDemo
  197.       END SELECT
  198.     END IF
  199.   CASE 5  'Help
  200.     VERTICALMENU VertMenu5$(),VertInfo5$(),VRtrn$,BarSave$,Mouse%,4,HelpTextColor%,HelpAttr%,15,TopRow%,Marker%,HPointer%,112,1,1
  201.     IF LEN(VRtrn$) THEN
  202.       SELECT CASE VRtrn$
  203.     CASE "Ask"
  204.           GOSUB AskDemo
  205.         CASE "Maybe"
  206.           GOSUB MaybeDemo
  207.     CASE "YesNo"
  208.           GOSUB YesNoDemo
  209.         CASE "Question"
  210.           GOSUB QuestionDemo
  211.       END SELECT
  212.     END IF
  213.   CASE 6  'Help
  214.     VERTICALMENU VertMenu6$(),VertInfo6$(),VRtrn$,BarSave$,Mouse%,4,HelpTextColor%,HelpAttr%,15,TopRow%,Marker%,HPointer%,112,1,1
  215.     IF LEN(VRtrn$) THEN
  216.       SELECT CASE VRtrn$
  217.         CASE "Help"
  218.           GOSUB ErrorMessage
  219.         CASE "Future"
  220.           GOSUB FutureFeatures
  221.         CASE "About DNALIB"
  222.           GOSUB AboutDNA
  223.         CASE "Quit"
  224.           VRtrn$ = "Quit"
  225.       END SELECT
  226.     END IF
  227. END SELECT
  228.  
  229. HiLight% = 1
  230.  
  231. IF Been% = 0 THEN
  232.   GOSUB AboutDNA
  233.   Been% = 1
  234. END IF
  235.  
  236. LOOP UNTIL VRtrn$ = "Quit"
  237.  
  238. DELAY .5
  239. COLOR 7,0
  240. CLS
  241.  
  242. END
  243. '============================================================================
  244. AreaCLSDemo:
  245.  
  246. IF Mouse% THEN HideCursor
  247.  
  248. DEF SEG = &HB800
  249. BaseScreen$ = PEEK$(0,4000)
  250. POPWIND "AreaCLS Demo",5,20,20,60,31,0,1
  251. COLOR 15,4:LOCATE 25,28,0:PRINT "  Press a key to continue  ";
  252. WHILE NOT INSTAT:WEND
  253. Dump$ = INKEY$
  254. AreaCLS 5,33,1,14,1,79
  255. WHILE NOT INSTAT:WEND
  256. Dump$ = INKEY$
  257. AreaCLS 19,20,2,41,2,31
  258. WHILE NOT INSTAT:WEND
  259. Dump$ = INKEY$
  260. AreaCLS 5,20,14,12,11,112
  261. WHILE NOT INSTAT:WEND
  262. Dump$ = INKEY$
  263. AreaCLS 5,60,14,1,12,44
  264. WHILE NOT INSTAT:WEND
  265. Dump$ = INKEY$
  266. AreaCLS 5,20,16,41,32,0
  267. WHILE NOT INSTAT:WEND
  268. Dump$ = INKEY$
  269. AreaCLS 3,1,21,80,176,30
  270. WHILE NOT INSTAT:WEND
  271. Dump$ = INKEY$
  272.  
  273. IF Mouse% THEN HideCursor
  274.  
  275. DEF SEG = &HB800
  276. POKE$ 0,BaseScreen$
  277. DEF SEG
  278.  
  279. RETURN
  280. '----------------------------------------------------------------------------
  281. PokeAreaDemo:
  282.  
  283. IF Mouse% THEN HideCursor
  284.  
  285. DEF SEG = &HB800
  286. BaseScreen$ = PEEK$(0,4000)
  287. COLOR 15,4:LOCATE 25,28,0:PRINT "  Press a key to continue  ";
  288. WHILE NOT INSTAT:WEND
  289. Dump$ = INKEY$
  290. PokeArea 3,1,12,20,79
  291. WHILE NOT INSTAT:WEND
  292. Dump$ = INKEY$
  293. PokeArea 13,21,23,40,31
  294. WHILE NOT INSTAT:WEND
  295. Dump$ = INKEY$
  296. PokeArea 3,41,12,60,112
  297. WHILE NOT INSTAT:WEND
  298. Dump$ = INKEY$
  299. PokeArea 13,61,23,80,14
  300. WHILE NOT INSTAT:WEND
  301. Dump$ = INKEY$
  302. PokeArea 13,1,23,20,46
  303. WHILE NOT INSTAT:WEND
  304. Dump$ = INKEY$
  305. PokeArea 3,21,12,40,85
  306. WHILE NOT INSTAT:WEND
  307. Dump$ = INKEY$
  308. PokeArea 13,41,23,60,146
  309. WHILE NOT INSTAT:WEND
  310. Dump$ = INKEY$
  311. PokeArea 3,61,12,80,55
  312. WHILE NOT INSTAT:WEND
  313. Dump$ = INKEY$
  314.  
  315. FOR i% = 1 TO 128
  316.   PokeArea 3,1,23,80,i%
  317.   DELAY .05
  318.   PokeArea 5,10,21,71,i% + 1
  319.   DELAY .05
  320.   PokeArea 7,19,19,62,i% + 2
  321.   DELAY .05
  322.   PokeArea 9,28,17,53,i% + 3
  323.   DELAY .05
  324.   PokeArea 11,37,15,44,i% + 4
  325.   DELAY .05
  326. NEXT i%
  327.  
  328. IF Mouse% THEN HideCursor
  329.  
  330. DEF SEG = &HB800
  331. POKE$ 0,BaseScreen$
  332. DEF SEG
  333.  
  334. RETURN
  335. '----------------------------------------------------------------------------
  336. NoiseDemo:
  337.  
  338. FOR i% = 1 TO 6
  339.   Noise i%
  340.   IF i% = 4 THEN
  341.     FOR j% = 1 TO 20
  342.       Noise i%
  343.       DELAY .1
  344.     NEXT j%
  345.   END IF
  346.   DELAY 1
  347. NEXT i%
  348.  
  349. RETURN
  350. '----------------------------------------------------------------------------
  351. PercentageDemo:
  352.  
  353. IF Mouse% THEN HideCursor
  354.  
  355. SaveScreen Msg$,8,13,15,66,1
  356. Popwind "Percentage Demo",8,13,15,66,112,1,1
  357.  
  358. FOR i% = 0 to 100 STEP 20
  359.   Percentage i%,13,15,4,112
  360.   FOR j% = 0 TO 100
  361.     Percentage j%,10,15,1,112
  362.   NEXT j%
  363.   DELAY .2
  364. NEXT i%
  365.  
  366. DELAY 2
  367. RestoreScreen Msg$,8,13
  368.  
  369. RETURN
  370. '----------------------------------------------------------------------------
  371. ScrollDemo:
  372.  
  373. IF Mouse% THEN HideCursor
  374.  
  375. SCROLL "Scroll a message in both Directions ",1,0,25,112
  376. SCROLL "Scroll a message in both Directions ",1,1,25,112
  377.  
  378. RETURN
  379. '----------------------------------------------------------------------------
  380. MoveableWinDemo:
  381.  
  382. IF Mouse% THEN HideCursor
  383.  
  384. DEF SEG = &HB800
  385. BaseScreen$ = PEEK$(0,4000)
  386. POPWIND "Moveable Window",10,25,15,54,31,0,1
  387. DELAY .5
  388. TYPWRITE "Add some text",11,34,31
  389. TYPWRITE "use ARROW KEYS to move",12,29,31
  390. TYPWRITE "window, hit enter to end",13,28,31
  391. TYPWRITE "Moveable window demo",14,30,31
  392. SAVESCREEN Window1$,10,25,15,54,0
  393. MOVEABLEWINDOW BaseScreen$,Window1$,10,25
  394. DELAY .5
  395.  
  396. IF Mouse% THEN HideCursor
  397.  
  398. DEF SEG = &HB800
  399. POKE$ 0,BaseScreen$
  400. DEF SEG
  401.  
  402. RETURN
  403. '----------------------------------------------------------------------------
  404. LineEditDemo:
  405.  
  406. IF Mouse% THEN HideCursor
  407.  
  408. SAVESCREEN BaseScreen$,1,1,25,80,0
  409. LOCATE 25,8,0
  410. PRINT "Editing Keys = INSERT  DEL  ESC  HOME  END  BACKSPACE  ARROWKEYS";
  411.  
  412. Allow$ = CHR$(24) + "ABCDEFGHIJKLMNOPQRSTUVWXYZ "
  413. Text$ = "                                         "
  414. Fill% = 176 :Row% = 8 :Col% = 20
  415. POPWIND "UPPER CASE Only",7,18,9,62,112,1,1
  416. LINEEDIT Allow$,Text$,Mouse%,MouseRow%,MouseCol%,Fill%,Row%,Col%,Editkey%,14
  417.  
  418. IF LEN(RTRIM$(Text$)) THEN
  419.   Mess$(1) = "You Entered >" + RTRIM$(Text$) + "<"
  420.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  421. END IF
  422.  
  423. Allow$ = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  424. Text$ = "                                         "
  425. Fill% = 176 :Row% = 8 :Col% = 20
  426. POPWIND "Mixed Case Characters",7,18,9,62,112,1,1
  427. LINEEDIT Allow$,Text$,Mouse%,MouseRow%,MouseCol%,Fill%,Row%,Col%,Editkey%,14
  428.  
  429. IF LEN(RTRIM$(Text$)) THEN
  430.   Mess$(1) = "You Entered >" + RTRIM$(Text$) + "<"
  431.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  432. END IF
  433.  
  434. Allow$ = CHR$(25) + "abcdefghijklmnopqrstuvwxyz "
  435. Text$ = "                                         "
  436. Fill% = 176 :Row% = 8 :Col% = 20
  437. POPWIND "lower case Only",7,18,9,62,112,1,1
  438. LINEEDIT Allow$,Text$,Mouse%,MouseRow%,MouseCol%,Fill%,Row%,Col%,Editkey%,14
  439.  
  440. IF LEN(RTRIM$(Text$)) THEN
  441.   Mess$(1) = "You Entered >" + RTRIM$(Text$) + "<"
  442.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  443. END IF
  444.  
  445. Allow$ = "1234567890"
  446. Text$ = "                                         "
  447. Fill% = 176 :Row% = 8 :Col% = 20
  448. POPWIND "Numbers Only",7,18,9,62,112,1,1
  449. LINEEDIT Allow$,Text$,Mouse%,MouseRow%,MouseCol%,Fill%,Row%,Col%,Editkey%,14
  450.  
  451. IF LEN(RTRIM$(Text$)) THEN
  452.   Mess$(1) = "You Entered >" + RTRIM$(Text$) + "<"
  453.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  454. END IF
  455.  
  456. Allow$ = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-=`~!@#$%^&*()_+}{[]:;'?><,./\|"
  457. Text$ = "                                         "
  458. Fill% = 176 :Row% = 8 :Col% = 20
  459. POPWIND "Any Characters",7,18,9,62,112,1,1
  460. LINEEDIT Allow$,Text$,Mouse%,MouseRow%,MouseCol%,Fill%,Row%,Col%,Editkey%,14
  461.  
  462. IF LEN(RTRIM$(Text$)) THEN
  463.   Mess$(1) = "You Entered >" + RTRIM$(Text$) + "<"
  464.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  465. END IF
  466.  
  467. IF Mouse% THEN HideCursor
  468.  
  469. RESTORESCREEN BaseScreen$,1,1
  470.  
  471. RETURN
  472. '----------------------------------------------------------------------------
  473. DataEntry:
  474.  
  475. IF Mouse% THEN HideCursor
  476.  
  477. InitString$ = "ATZ                           "
  478. DialCom$ = "ATDT"
  479. ComPort$ = "COM2:"
  480. BaudRate$ = "2400  "
  481. DataBits$ = "8"
  482. Parity$ = "None "
  483. StopBit$ = "1"
  484.  
  485. SaveScreen SetUpScreen$,5,12,13,68,1
  486. Popwind "Setup Menu",5,12,13,68,31,1,1
  487.  
  488. COLOR 14,1
  489. LOCATE 6,14,0: PRINT  "Initialization string:";
  490. LOCATE 7,14,0: PRINT  "Dial Command:";
  491. LOCATE 8,14,0: PRINT "Communications Port:";
  492. LOCATE 9,14,0: PRINT "Default Baud Rate:";
  493. LOCATE 10,14,0: PRINT "Data Bits:";
  494. LOCATE 11,14,0: PRINT "Parity:";
  495. LOCATE 12,14,0: PRINT "Stop Bits:";
  496. '----------------------------------------------------------------------------
  497. Label1:
  498.   GOSUB RePaint
  499. Allow$ = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890~%&|"
  500. LineEdit Allow$,InitString$,Mouse%,MouseRow%,MouseCol%,176,6,37,Editkey%,14
  501.     SELECT CASE Editkey%
  502.       CASE 27
  503.         GOTO Finished
  504.       CASE -72
  505.         GOTO Label7
  506.       CASE -255
  507.         IF MouseRow% > 5 AND MouseRow% < 13 AND MouseCol% > 12 AND MouseCol% < 68 THEN
  508.           SELECT CASE MouseRow%
  509.             CASE 6
  510.               IF MouseCol% >= 37 AND MouseCol% <= 66 THEN GOTO Label2
  511.             CASE 7
  512.               IF MouseCol% >= 28 AND MouseCol% <= 31 THEN GOTO Label2
  513.             CASE 8
  514.               IF MouseCol% >= 35 AND MouseCol% <= 39 THEN GOTO Label3
  515.             CASE 9
  516.               IF MouseCol% >= 33 AND MouseCol% <= 38 THEN GOTO Label4
  517.             CASE 10
  518.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label5
  519.             CASE 11
  520.               IF MouseCol% >= 22 AND MouseCol% <= 26 THEN GOTO Label6
  521.             CASE 12
  522.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label7
  523.           END SELECT
  524.         ELSE
  525.           GOTO Finished
  526.         END IF
  527.     END SELECT
  528. '----------------------------------------------------------------------------
  529. Label2:
  530.   GOSUB RePaint
  531. Allow$ = CHR$(24) + "ADPT"
  532. LineEdit Allow$,DialCom$,Mouse%,MouseRow%,MouseCol%,176,7,28,Editkey%,14
  533.     SELECT CASE Editkey%
  534.       CASE 13
  535.         Label2Pick:
  536.         REDIM Choice$(1:3)
  537.         Choice$(1) = "ATDT"
  538.         Choice$(2) = "ATPT"
  539.         ScrollBox Choice$(),DialRtrn$,"",Mouse%,3,0,Cntr%,1,14,79,6,33,1,1
  540.         IF LEN(DialRtrn$) THEN
  541.           DialCom$ = DialRtrn$
  542.         END IF
  543.       CASE 27
  544.         GOTO Finished
  545.       CASE -72
  546.         GOTO Label1
  547.       CASE -255
  548.         IF MouseRow% > 5 AND MouseRow% < 13 AND MouseCol% > 12 AND MouseCol% < 68 THEN
  549.           SELECT CASE MouseRow%
  550.             CASE 6
  551.               IF MouseCol% >= 37 AND MouseCol% <= 66 THEN GOTO Label1
  552.             CASE 7
  553.               IF MouseCol% >= 28 AND MouseCol% <= 31 THEN GOTO Label2Pick
  554.             CASE 8
  555.               IF MouseCol% >= 35 AND MouseCol% <= 39 THEN GOTO Label3
  556.             CASE 9
  557.               IF MouseCol% >= 33 AND MouseCol% <= 38 THEN GOTO Label4
  558.             CASE 10
  559.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label5
  560.             CASE 11
  561.               IF MouseCol% >= 22 AND MouseCol% <= 26 THEN GOTO Label6
  562.             CASE 12
  563.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label7
  564.           END SELECT
  565.         ELSE
  566.           GOTO Finished
  567.         END IF
  568.     END SELECT
  569. '----------------------------------------------------------------------------
  570. Label3:
  571.   GOSUB RePaint
  572. LineEdit CHR$(24) + "1234COM:",ComPort$,Mouse%,MouseRow%,MouseCol%,176,8,35,Editkey%,14
  573.     SELECT CASE Editkey%
  574.       CASE 13
  575.         Label3Pick:
  576.         REDIM Choice$(1:3)
  577.         Choice$(1) = "COM2:"
  578.         Choice$(2) = "COM1:"
  579.         ScrollBox Choice$(),ComRtrn$,"",Mouse%,3,0,Cntr%,1,14,79,7,41,1,1
  580.         IF LEN(ComRtrn$) THEN
  581.           ComPort$ = ComRtrn$
  582.         END IF
  583.       CASE 27
  584.         GOTO Finished
  585.       CASE -72
  586.         GOTO Label2
  587.       CASE -255
  588.         IF MouseRow% > 5 AND MouseRow% < 13 AND MouseCol% > 12 AND MouseCol% < 68 THEN
  589.           SELECT CASE MouseRow%
  590.             CASE 6
  591.               IF MouseCol% >= 37 AND MouseCol% <= 66 THEN GOTO Label1
  592.             CASE 7
  593.               IF MouseCol% >= 28 AND MouseCol% <= 31 THEN GOTO Label2
  594.             CASE 8
  595.               IF MouseCol% >= 35 AND MouseCol% <= 39 THEN GOTO Label3Pick
  596.             CASE 9
  597.               IF MouseCol% >= 33 AND MouseCol% <= 38 THEN GOTO Label4
  598.             CASE 10
  599.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label5
  600.             CASE 11
  601.               IF MouseCol% >= 22 AND MouseCol% <= 26 THEN GOTO Label6
  602.             CASE 12
  603.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label7
  604.           END SELECT
  605.         ELSE
  606.           GOTO Finished
  607.         END IF
  608.     END SELECT
  609. '----------------------------------------------------------------------------
  610. Label4:
  611.   GOSUB RePaint
  612. LineEdit "0123456789",BaudRate$,Mouse%,MouseRow%,MouseCol%,176,9,33,Editkey%,14
  613.     SELECT CASE Editkey%
  614.       CASE 13
  615.         Label4Pick:
  616.         REDIM Choice$(1:15)
  617.         Choice$(1) = "    75"
  618.         Choice$(2) = "   110"
  619.         Choice$(3) = "   150"
  620.         Choice$(4) = "   300"
  621.         Choice$(5) = "   600"
  622.         Choice$(6) = "  1200"
  623.         Choice$(7) = "  1800"
  624.         Choice$(8) = "  2400"
  625.         Choice$(9) = "  4800"
  626.         Choice$(10) = "  9600"
  627.         Choice$(11) = " 19200"
  628.         Choice$(12) = " 38400"
  629.         Choice$(13) = " 57600"
  630.         Choice$(14) = "115200"
  631.         ScrollBox Choice$(),BaudRtrn$,"",Mouse%,7,0,Cntr%,8,14,79,8,40,1,1
  632.         IF LEN(BaudRtrn$) THEN
  633.           BaudRate$ = LEFT$(BaudRtrn$ + "    ",6)
  634.         END IF
  635.       CASE 27
  636.         GOTO Finished
  637.       CASE -72
  638.         GOTO Label3
  639.       CASE -255
  640.         IF MouseRow% > 5 AND MouseRow% < 13 AND MouseCol% > 12 AND MouseCol% < 68 THEN
  641.           SELECT CASE MouseRow%
  642.             CASE 6
  643.               IF MouseCol% >= 37 AND MouseCol% <= 66 THEN GOTO Label1
  644.             CASE 7
  645.               IF MouseCol% >= 28 AND MouseCol% <= 31 THEN GOTO Label2
  646.             CASE 8
  647.               IF MouseCol% >= 35 AND MouseCol% <= 39 THEN GOTO Label3
  648.             CASE 9
  649.               IF MouseCol% >= 33 AND MouseCol% <= 38 THEN GOTO Label4Pick
  650.             CASE 10
  651.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label5
  652.             CASE 11
  653.               IF MouseCol% >= 22 AND MouseCol% <= 26 THEN GOTO Label6
  654.             CASE 12
  655.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label7
  656.           END SELECT
  657.         ELSE
  658.           GOTO Finished
  659.         END IF
  660.     END SELECT
  661. '----------------------------------------------------------------------------
  662. Label5:
  663.   GOSUB RePaint
  664. LineEdit "8765",DataBits$,Mouse%,MouseRow%,MouseCol%,176,10,25,Editkey%,14
  665.     SELECT CASE Editkey%
  666.       CASE 13
  667.         Label5Pick:
  668.         REDIM Choice$(1:5)
  669.         Choice$(1) = "8"
  670.         Choice$(2) = "7"
  671.         Choice$(3) = "6"
  672.         Choice$(4) = "5"
  673.         ScrollBox Choice$(),DataRtrn$,"",Mouse%,5,0,Cntr%,1,14,79,9,27,1,1
  674.         IF LEN(DataRtrn$) THEN
  675.           DataBits$ = DataRtrn$
  676.         END IF
  677.       CASE 27
  678.         GOTO Finished
  679.       CASE -72
  680.         GOTO Label4
  681.       CASE -255
  682.         IF MouseRow% > 5 AND MouseRow% < 13 AND MouseCol% > 12 AND MouseCol% < 68 THEN
  683.           SELECT CASE MouseRow%
  684.             CASE 6
  685.               IF MouseCol% >= 37 AND MouseCol% <= 66 THEN GOTO Label1
  686.             CASE 7
  687.               IF MouseCol% >= 28 AND MouseCol% <= 31 THEN GOTO Label2
  688.             CASE 8
  689.               IF MouseCol% >= 35 AND MouseCol% <= 39 THEN GOTO Label3
  690.             CASE 9
  691.               IF MouseCol% >= 33 AND MouseCol% <= 38 THEN GOTO Label4
  692.             CASE 10
  693.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label5Pick
  694.             CASE 11
  695.               IF MouseCol% >= 22 AND MouseCol% <= 26 THEN GOTO Label6
  696.             CASE 12
  697.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label7
  698.           END SELECT
  699.         ELSE
  700.           GOTO Finished
  701.         END IF
  702.     END SELECT
  703. '----------------------------------------------------------------------------
  704. Label6:
  705.   GOSUB RePaint
  706. Allow$ = "NoEvenOdMarkSpc"
  707. LineEdit Allow$,Parity$,Mouse%,MouseRow%,MouseCol%,176,11,22,Editkey%,14
  708.     SELECT CASE Editkey%
  709.       CASE 13
  710.         Label6Pick:
  711.         REDIM Choice$(1:6)
  712.         Choice$(1) = "None "
  713.         Choice$(2) = "Even "
  714.         Choice$(3) = "Odd  "
  715.         Choice$(4) = "Mark "
  716.         Choice$(5) = "Space"
  717.         ScrollBox Choice$(),ParaRtrn$,"",Mouse%,6,0,Cntr%,1,14,79,10,28,1,1
  718.         IF LEN(ParaRtrn$) THEN
  719.           Parity$ = ParaRtrn$
  720.         END IF
  721.       CASE 27
  722.         GOTO Finished
  723.       CASE -72
  724.         GOTO Label5
  725.       CASE -255
  726.         IF MouseRow% > 5 AND MouseRow% < 13 AND MouseCol% > 12 AND MouseCol% < 68 THEN
  727.           SELECT CASE MouseRow%
  728.             CASE 6
  729.               IF MouseCol% >= 37 AND MouseCol% <= 66 THEN GOTO Label1
  730.             CASE 7
  731.               IF MouseCol% >= 28 AND MouseCol% <= 31 THEN GOTO Label2
  732.             CASE 8
  733.               IF MouseCol% >= 35 AND MouseCol% <= 39 THEN GOTO Label3
  734.             CASE 9
  735.               IF MouseCol% >= 33 AND MouseCol% <= 38 THEN GOTO Label4
  736.             CASE 10
  737.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label5
  738.             CASE 11
  739.               IF MouseCol% >= 22 AND MouseCol% <= 26 THEN GOTO Label6Pick
  740.             CASE 12
  741.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label7
  742.           END SELECT
  743.         ELSE
  744.           GOTO Finished
  745.         END IF
  746.     END SELECT
  747. '----------------------------------------------------------------------------
  748. Label7:
  749.   GOSUB RePaint
  750. LineEdit "12",StopBit$,Mouse%,MouseRow%,MouseCol%,176,12,25,Editkey%,14
  751.     SELECT CASE Editkey%
  752.       CASE 13
  753.         Label7Pick:
  754.         REDIM Choice$(1:3)
  755.         Choice$(1) = "1"
  756.         Choice$(2) = "2"
  757.         ScrollBox Choice$(),StopRtrn$,"",Mouse%,6,0,Cntr%,1,14,79,10,28,1,1
  758.         IF LEN(StopRtrn$) THEN
  759.           StopBit$ = StopRtrn$
  760.         END IF
  761.       CASE 27
  762.         GOTO Finished
  763.       CASE -72
  764.         GOTO Label6
  765.       CASE -80
  766.         GOTO Label1
  767.       CASE -255
  768.         IF MouseRow% > 5 AND MouseRow% < 13 AND MouseCol% > 12 AND MouseCol% < 68 THEN
  769.           SELECT CASE MouseRow%
  770.             CASE 6
  771.               IF MouseCol% >= 37 AND MouseCol% <= 66 THEN GOTO Label1
  772.             CASE 7
  773.               IF MouseCol% >= 28 AND MouseCol% <= 31 THEN GOTO Label2
  774.             CASE 8
  775.               IF MouseCol% >= 35 AND MouseCol% <= 39 THEN GOTO Label3
  776.             CASE 9
  777.               IF MouseCol% >= 33 AND MouseCol% <= 38 THEN GOTO Label4
  778.             CASE 10
  779.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label5
  780.             CASE 11
  781.               IF MouseCol% >= 22 AND MouseCol% <= 26 THEN GOTO Label6
  782.             CASE 12
  783.               IF MouseCol% >= 25 AND MouseCol% <= 26 THEN GOTO Label7Pick
  784.           END SELECT
  785.         ELSE
  786.           GOTO Finished
  787.         END IF
  788.     END SELECT
  789. '----------------------------------------------------------------------------
  790. Finished:
  791.  
  792. GOSUB RePaint
  793.  
  794. DELAY 2
  795.  
  796. RestoreScreen SetUpScreen$,5,12
  797.  
  798. RETURN
  799. '----------------------------------------------------------------------------
  800. RePaint:
  801.  
  802. LineEdit "",InitString$,0,0,0,176,6,37,255,31
  803. LineEdit "",DialCom$,0,0,0,176,7,28,255,31
  804. LineEdit "",ComPort$,0,0,0,176,8,35,255,31
  805. LineEdit "",BaudRate$,0,0,0,176,9,33,255,31
  806. LineEdit "",DataBits$,0,0,0,176,10,25,255,31
  807. LineEdit "",Parity$,0,0,0,176,11,22,255,31
  808. LineEdit "",StopBit$,0,0,0,176,12,25,255,31
  809.  
  810. RETURN
  811. '----------------------------------------------------------------------------
  812. DNAWriteDemo:
  813.  
  814. IF LEN(DIR$("DNAWRITE.EXE")) THEN
  815.   MEMPACK
  816.   IF Mouse% THEN HideCursor
  817.   SaveScreen Dos$,1,1,25,80,0
  818.   SHELL "DNAWRITE.EXE"
  819.   IF Mouse% THEN HideCursor
  820.   RestoreScreen Dos$,1,1
  821. ELSE
  822.   GOSUB ErrorMessage
  823. END IF
  824.  
  825. RETURN
  826. '----------------------------------------------------------------------------
  827. SingleEditBox:
  828.  
  829. TextOne$ = SPACE$(45)
  830. Allow$ = CHR$(24) + "ABCDEFGHIJKLMNOPQRSTUVWXYZ "
  831. EditBox "Prompt String:",TextOne$,Allow$,Mouse%,176,6,79,14,112,1,1
  832. TextOne$ = RTRIM$(TextOne$)
  833.  
  834. IF LEN(TextOne$) THEN
  835.   Mess$(1) = "You Entered >" + TextOne$ + "<"
  836.   Mess$(2) = ""
  837.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  838. END IF
  839.  
  840. RETURN
  841. '----------------------------------------------------------------------------
  842. DoubleEditBox:
  843.  
  844. TextOne$ = SPACE$(40)
  845. TextTwo$ = SPACE$(40)
  846. Allow$ = " ACEGIKMOQSUWYbdfhjlnprtvxz24680"
  847. DoubleBox "First Prompt:","Second Prompt:",TextOne$,TextTwo$,Allow$,Mouse%,255,176,6,79,14,112,1,1
  848. TextOne$ = RTRIM$(TextOne$)
  849. TextTwo$ = RTRIM$(TextTwo$)
  850.  
  851. IF LEN(TextOne$) AND LEN(TextTwo$) THEN
  852.   Mess$(1) = "You Entered >" + TextOne$ + "<"
  853.   Mess$(2) = "You Entered >" + TextTwo$ + "<"
  854.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  855. END IF
  856.  
  857. RETURN
  858. '----------------------------------------------------------------------------
  859. PopwindDemo:
  860.  
  861. IF Mouse% THEN HideCursor
  862.  
  863. SAVESCREEN BaseScreen$,1,1,25,80,0
  864. tr% = 12 :lc% = 28 :br% = 14 :rc% = 53
  865.  
  866. FOR i% = 1 TO 10
  867.   POPWIND "",tr%,lc%,br%,rc%,112,0,1
  868.   DECR tr% :INCR br% :DECR lc%,3 :INCR rc%,3
  869.   FOR j% = 1 TO 10000
  870.   NEXT j%
  871. NEXT i%
  872.  
  873. DELAY .5
  874.  
  875. FOR l% = 1 TO 2
  876.   FOR k% = 1 TO 5
  877.     fg% = 15 :bg% = k% :bdr% = k% :shd% = 0
  878.     IF l% = 2 THEN shd% = 1
  879.     MakeByte DAttr%,fg%,bg%
  880.     POPWIND "",5,14,21,68,DAttr%,shd%,bdr%
  881.     DELAY .6
  882.   NEXT k%
  883. NEXT l%
  884.  
  885. DELAY .6
  886. tr% = 3 :lc% = 1 :br% = 23 :rc% = 80
  887.  
  888. FOR i% = 1 TO 10
  889.   POPWIND "",tr%,lc%,br%,rc%,112,0,1
  890.   INCR tr% :DECR br% :INCR lc%,3 :DECR rc%,3
  891.   FOR j% = 1 TO 2000
  892.   NEXT j%
  893. NEXT i%
  894.  
  895. IF Mouse% THEN HideCursor
  896.  
  897. RESTORESCREEN BaseScreen$,1,1
  898.  
  899. RETURN
  900. '----------------------------------------------------------------------------
  901. SaveRestoreDemo:
  902.  
  903. IF Mouse% THEN HideCursor
  904.  
  905. SAVESCREEN BaseScreen$,1,1,25,80,0
  906. DELAY .5
  907. SAVESCREEN Screen1$,4,2,12,39,0
  908. POPWIND "Window 1",4,2,12,39,78,0,1
  909. SAVESCREEN Window1$,4,2,12,39,0
  910. DELAY .5
  911. SAVESCREEN Screen2$,4,42,12,79,0
  912. POPWIND "Window 2",4,42,12,79,31,0,2
  913. SAVESCREEN Window2$,4,42,12,79,0
  914. DELAY .5
  915. SAVESCREEN Screen3$,14,2,22,39,0
  916. POPWIND "Window 3",14,2,22,39,44,0,3
  917. SAVESCREEN Window3$,14,2,22,39,0
  918. DELAY .5
  919. SAVESCREEN Screen4$,14,42,22,79,0
  920. POPWIND "Window 4",14,42,22,79,110,0,4
  921. SAVESCREEN Window4$,14,42,22,79,0
  922. DELAY .5
  923. SAVESCREEN Screen5$,5,5,21,77,0
  924. POPWIND "Window 5",5,5,21,77,14,0,2
  925. SAVESCREEN Window5$,5,5,21,77,0
  926. DELAY .5
  927. RESTORESCREEN Screen5$,5,5
  928. DELAY .5
  929. RESTORESCREEN Screen4$,14,42
  930. DELAY .5
  931. RESTORESCREEN Screen1$,4,2
  932. DELAY .5
  933. RESTORESCREEN Screen3$,14,2
  934. DELAY .5
  935. RESTORESCREEN Screen2$,4,42
  936. DELAY .5
  937. FOR i% = 1 TO 5
  938.   RESTORESCREEN Window1$,4,2
  939.   RESTORESCREEN Window2$,4,42
  940.   RESTORESCREEN Window3$,14,2
  941.   RESTORESCREEN Window4$,14,42
  942.   DELAY .1
  943.   RESTORESCREEN Window2$,4,2
  944.   RESTORESCREEN Window3$,4,42
  945.   RESTORESCREEN Window4$,14,2
  946.   RESTORESCREEN Window1$,14,42
  947.   DELAY .1
  948.   RESTORESCREEN Window3$,4,2
  949.   RESTORESCREEN Window4$,4,42
  950.   RESTORESCREEN Window1$,14,2
  951.   RESTORESCREEN Window2$,14,42
  952.   DELAY .1
  953.   RESTORESCREEN Window4$,4,2
  954.   RESTORESCREEN Window1$,4,42
  955.   RESTORESCREEN Window2$,14,2
  956.   RESTORESCREEN Window3$,14,42
  957.   DELAY .1
  958.   RESTORESCREEN Window1$,4,2
  959.   RESTORESCREEN Window2$,4,42
  960.   RESTORESCREEN Window3$,14,2
  961.   RESTORESCREEN Window4$,14,42
  962.   DELAY .1
  963. NEXT i%
  964. RESTORESCREEN Window5$,5,5
  965. DELAY .5
  966. RESTORESCREEN Window2$,4,42
  967. DELAY .5
  968. RESTORESCREEN Window5$,5,5
  969. DELAY .5
  970. RESTORESCREEN Window1$,4,2
  971. DELAY .5
  972. RESTORESCREEN Window5$,5,5
  973. DELAY .5
  974. RESTORESCREEN Window4$,14,42
  975. DELAY .5
  976. RESTORESCREEN Window5$,5,5
  977. DELAY .5
  978. RESTORESCREEN Window3$,14,2
  979. DELAY .5
  980. RESTORESCREEN Window5$,5,5
  981. DELAY .5
  982. SAVESCREEN Corner1$,4,2,12,39,0
  983. SAVESCREEN Corner2$,4,42,12,79,0
  984. SAVESCREEN Corner3$,14,2,22,39,0
  985. SAVESCREEN Corner4$,14,42,22,79,0
  986. RESTORESCREEN Corner4$,4,2
  987. RESTORESCREEN Corner1$,14,42
  988. RESTORESCREEN Corner2$,14,2
  989. RESTORESCREEN Corner3$,4,42
  990. DELAY 2
  991.  
  992. IF Mouse% THEN HideCursor
  993.  
  994. RESTORESCREEN BaseScreen$,1,1
  995.  
  996. RETURN
  997. '----------------------------------------------------------------------------
  998. BrowseDemo:
  999.  
  1000. IF LEN(DIR$("DNA.DOC")) THEN
  1001.   BROWSE "DNA.DOC",Mouse%,14,3,1,23,80,31,0,3
  1002. ELSE
  1003.   GOSUB ErrorMessage
  1004. END IF
  1005.  
  1006. RETURN
  1007. '----------------------------------------------------------------------------
  1008. DialogDemo:
  1009.  
  1010. DMess$(1) = "Dialog will dynamicaly size to the message you want to"
  1011. DMess$(2) = "display. And will allow you either to centre it on the"
  1012. DMess$(3) = "screen or place it anywhere you like."
  1013. DMess$(4) = "It will centre the text in the box for you as well."
  1014. DMess$(5) = "Dialog saves the area under the box and then waits"
  1015. DMess$(6) = "for a key press before it restores the screen."
  1016. DMess$(7) = "NEW. you can now pass Dialog how may seconds to"
  1017. DMess$(8) = "display on screen or leave the field blank and"
  1018. DMess$(9) = "wait for a key press."
  1019.  
  1020. DIALOG DMess$(),"Dialog box Demo",2,Mouse%,1,0,0,0,116,1,1
  1021. DELAY .2
  1022.  
  1023. DIALOG DMess$(),"Dialog box Demo",2,Mouse%,2,4,4,0,116,1,1
  1024. DELAY .2
  1025.  
  1026. DIALOG DMess$(),"Dialog box Demo",0,Mouse%,3,0,0,0,116,1,1
  1027.  
  1028. RETURN
  1029. '----------------------------------------------------------------------------
  1030. ScrollBoxDemo:
  1031.  
  1032. FOR Num% = 1 TO 100
  1033.   DemoName$(Num%) = CHR$(Num% + 32) + " This is Choice number " + STR$(Num%)
  1034. NEXT Num%
  1035.  
  1036. SCROLLBOX DemoName$(),PickName$,"Scroll Box Demo",Mouse%,10,0,1,0,14,112,0,0,1,1
  1037.  
  1038. IF LEN(PickName$) THEN
  1039.   Mess$(1) = "You Picked > " + PickName$ + " <"
  1040.   Mess$(2) = ""
  1041.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1042. END IF
  1043.  
  1044. SCROLLBOX DemoName$(),PickName$,"Scroll Box Demo",Mouse%,17,0,0,0,14,112,4,3,1,1
  1045.  
  1046. IF LEN(PickName$) THEN
  1047.   Mess$(1) = "You Picked > " + PickName$ + " <"
  1048.   Mess$(2) = ""
  1049.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1050. END IF
  1051.  
  1052.  
  1053. RETURN
  1054. '----------------------------------------------------------------------------
  1055. VirtualBoxDemo:
  1056.  
  1057. FOR Num% = 1 TO 100
  1058.   DemoName$(Num%) = CHR$(Num% + 32) + " This is to simulate a very wide Choice number " + STR$(Num%) + " that is wider than the eighty columns that are allowed"
  1059. NEXT Num%
  1060.  
  1061. VirtualBox DemoName$(),PickName$,"Virtual Box Demo",Mouse%,10,0,1,70,14,112,0,0,1,1
  1062.  
  1063. IF LEN(PickName$) THEN
  1064.   Mess$(1) = "You Picked > " + MID$(PickName$,35,18) + " <"
  1065.   Mess$(2) = ""
  1066.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1067. END IF
  1068.  
  1069. VirtualBox DemoName$(),PickName$,"Virtual Box Demo",Mouse%,16,0,0,40,14,112,4,3,1,1
  1070.  
  1071. IF LEN(PickName$) THEN
  1072.   Mess$(1) = "You Picked > " + MID$(PickName$,35,18) + " <"
  1073.   Mess$(2) = ""
  1074.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1075. END IF
  1076.  
  1077. RETURN
  1078. '----------------------------------------------------------------------------
  1079. CalcBoxDemo:
  1080.  
  1081. CalcBox Mouse%,176,6,47,79,14,112,1,1
  1082.  
  1083. RETURN
  1084. '----------------------------------------------------------------------------
  1085. LotusDemo:
  1086.  
  1087. IF Mouse% THEN HideCursor
  1088.  
  1089. DEF SEG = &HB800
  1090. BaseScreen$ = PEEK$(0,4000)
  1091.  
  1092. Menu$(1) = "@Open"
  1093. Menu$(2) = "@Create"
  1094. Menu$(3) = "@List"
  1095. Menu$(4) = "@Browse"
  1096. Menu$(5) = "@Add"
  1097. Menu$(6) = "@Delete"
  1098. Menu$(7) = "E@xtract"
  1099. Menu$(8) = "@Print"
  1100. Menu$(9) = "@Kill"
  1101. Menu$(10) = "@Erase"
  1102. Menu$(11) = "@Quit"
  1103.  
  1104. Info$(1) = "Open a PowerBASIC Library for modification"
  1105. Info$(2) = "Create a PowerBASIC Library"
  1106. Info$(3) = "List the OBJ's or PBU modules in a PowerBASIC Library"
  1107. Info$(4) = "Browse the current List/Map File"
  1108. Info$(5) = "Add OBJ's or PBU modules to a New or Existing PowerBASIC Library"
  1109. Info$(6) = "Delete OBJ's or PBU modules from an Existing PowerBASIC Library"
  1110. Info$(7) = "Extract OBJ's or PBU modules from an Existing PowerBASIC Library"
  1111. Info$(8) = "Print the currently selected library Map File"
  1112. Info$(9) = "Delete a PowerBASIC Library File from Disk"
  1113. Info$(10) = "Erase OBJ's or PBU modules from DNA Library Managers work Directory"
  1114. Info$(11) = "Quit the DNA Library Manager"
  1115.  
  1116. LPointer% = 1
  1117. POPWIND "",1,1,2,80,0,0,0
  1118. POPWIND "",3,1,25,80,31,0,1
  1119. COLOR 7,1
  1120.  
  1121. Jump:
  1122.  
  1123. LOTUS Menu$(),Info$(),HiLight%,Mouse%,LPointer%,14,14,79,7,112,1,2
  1124.  
  1125.  
  1126. IF LPointer% > 0 AND LPointer% < 11 THEN
  1127.   PasteIn$ = REMOVE$(Menu$(LPointer%),"@")
  1128.   Mess$(1) = "You Picked > " + PasteIn$ + " <"
  1129.   Mess$(2) = ""
  1130.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1131. ELSE
  1132.   IF LPointer% = 11 THEN Ky$ = CHR$(27):GOTO WayOut
  1133. END IF
  1134.  
  1135. DO
  1136. DELAY .5
  1137. WHILE NOT INSTAT
  1138.   IF Mouse% THEN
  1139.     ShowCursor: Rgt% = 0: Lft% = 0
  1140.     Clicked Rgt%,Lft%,MRow%,MCol%
  1141.     IF Lft% AND MRow% = 1 THEN
  1142.       FindMenu MRow%,MCol%,Found%
  1143.       IF Found% THEN
  1144.         LPointer% = Found%
  1145.         HideCursor: HiLight% = 1
  1146.         GOTO Jump
  1147.       END IF
  1148.     END IF
  1149.   END IF
  1150.   IF AltKey% THEN
  1151.     HiLight% = 1
  1152.     IF LPointer% = 0 THEN LPointer% = 1
  1153.     GOTO Jump
  1154.   END IF
  1155. WEND
  1156.  
  1157. Ky$ = INKEY$
  1158.  
  1159. WayOut:
  1160.  
  1161. LOOP UNTIL Ky$ = CHR$(27)
  1162.  
  1163. IF Mouse% THEN HideCursor
  1164.  
  1165. DEF SEG = &HB800
  1166. POKE$ 0,BaseScreen$
  1167. DEF SEG
  1168.  
  1169. RETURN
  1170. '----------------------------------------------------------------------------
  1171. ScrollMenuDemo:
  1172.  
  1173. Menu$(1) = "@Open"
  1174. Menu$(2) = "@Create"
  1175. Menu$(3) = "@List"
  1176. Menu$(4) = "@Browse"
  1177. Menu$(5) = "@Add"
  1178. Menu$(6) = "@Delete"
  1179. Menu$(7) = "E@xtract"
  1180. Menu$(8) = "@Print"
  1181. Menu$(9) = "@Kill"
  1182. Menu$(10) = "@Erase"
  1183. Menu$(11) = "@Quit"
  1184.  
  1185. Info$(1) = "Open a PowerBASIC Library for modification"
  1186. Info$(2) = "Create a PowerBASIC Library"
  1187. Info$(3) = "List the OBJ's or PBU modules in a Library"
  1188. Info$(4) = "Browse the current List/Map File"
  1189. Info$(5) = "Add OBJ's or PBU modules to a Library"
  1190. Info$(6) = "Delete OBJ's or PBU modules from Library"
  1191. Info$(7) = "Extract OBJ's or PBU modules"
  1192. Info$(8) = "Print the currently selected library Map File"
  1193. Info$(9) = "Delete a PowerBASIC Library File from Disk"
  1194. Info$(10) = "Erase OBJ's or PBU modules from work Directory"
  1195. Info$(11) = "Quit the DNA Library Manager"
  1196.  
  1197. ScrollMenu Menu$(),Info$(),Rtrn$,Mouse%,12,0,1,4,HelpTextColor%,HelpAttr%,14,112,0,0,1,1
  1198.  
  1199. IF LEN(Rtrn$) THEN
  1200.   Mess$(1) = "You Picked > " + Rtrn$ + " <"
  1201.   Mess$(2) = ""
  1202.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1203. END IF
  1204.  
  1205. ScrollMenu Menu$(),Info$(),Rtrn$,Mouse%,5,0,1,4,HelpTextColor%,HelpAttr%,14,112,0,0,1,1
  1206.  
  1207. IF LEN(Rtrn$) THEN
  1208.   Mess$(1) = "You Picked > " + Rtrn$ + " <"
  1209.   Mess$(2) = ""
  1210.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1211. END IF
  1212.  
  1213. ScrollMenu Menu$(),Info$(),Rtrn$,Mouse%,12,0,0,4,HelpTextColor%,HelpAttr%,14,112,4,4,1,1
  1214.  
  1215. IF LEN(Rtrn$) THEN
  1216.   Mess$(1) = "You Picked > " + Rtrn$ + " <"
  1217.   Mess$(2) = ""
  1218.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1219. END IF
  1220.  
  1221. RETURN
  1222. '----------------------------------------------------------------------------
  1223. DirectoryBoxDemo:
  1224.  
  1225. DirectoryBox FileName$,Mouse%,112,14,79,1,1
  1226.  
  1227. IF LEN(FileName$) THEN
  1228.   Mess$(1) = "You Picked > " + FileName$ + " <"
  1229.   Mess$(2) = ""
  1230.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1231. END IF
  1232.  
  1233. RETURN
  1234. '----------------------------------------------------------------------------
  1235. PickBoxDemo:
  1236.  
  1237. i% = 1
  1238. FDirectory$(i%) = DIR$("*.*")
  1239. DO
  1240.   INCR i%
  1241.   FDirectory$(i%) = DIR$
  1242.   IF i% = 500 THEN EXIT LOOP
  1243. LOOP WHILE FDirectory$(i%) <> ""
  1244.  
  1245. PickBox FDirectory$(),Picked$,"Listing of Files in the current directory",3,0,Mouse%,112,14,79,1,1
  1246.  
  1247. IF LEN(Picked$) THEN
  1248.   Mess$(1) = "You Picked > " + Picked$ + " <"
  1249.   Mess$(2) = ""
  1250.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1251. END IF
  1252.  
  1253. RETURN
  1254. '----------------------------------------------------------------------------
  1255. WriteToBoxDemo:
  1256.  
  1257. WriteToBox Rtrn$,"FILENAME.EXT",Mouse%,112,14,79,1,1
  1258.  
  1259. IF LEN(Rtrn$) THEN
  1260.   Mess$(1) = "You Picked > " + Rtrn$ + " <"
  1261.   Mess$(2) = ""
  1262.   DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1263. END IF
  1264.  
  1265. RETURN
  1266. '----------------------------------------------------------------------------
  1267. AskDemo:
  1268.  
  1269. Rtrn% = 1
  1270. ASK "Hit Return to Accept",Mouse%,Rtrn%,10,15,0,158,1,2
  1271.   SELECT CASE Rtrn%
  1272.     CASE 0
  1273.      Mess$(1) = " You Answered NO "
  1274.     CASE 1
  1275.      Mess$(1) = " You Answered YES "
  1276.     CASE 2
  1277.      Mess$(1) = " You CANCELED "
  1278.   END SELECT
  1279.  
  1280. Mess$(2) = ""
  1281. DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1282.  
  1283. RETURN
  1284. '----------------------------------------------------------------------------
  1285. MayBeDemo:
  1286.  
  1287. MayBe "MayBe you dont want to Answer ? (Y or N or Esc)",Answer%,Mouse%,10,79,112%,1,1
  1288.   SELECT CASE Answer%
  1289.     CASE 0
  1290.      Mess$(1) = " You Answered NO "
  1291.     CASE 1
  1292.      Mess$(1) = " You Answered YES "
  1293.     CASE 2
  1294.      Mess$(1) = " You CANCELED "
  1295.   END SELECT
  1296.  
  1297. Mess$(2) = ""
  1298. DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1299.  
  1300. RETURN
  1301. '----------------------------------------------------------------------------
  1302. YesNoDemo:
  1303.  
  1304. IF YesNo%("Answer Yes or No ? (Y or N)",Mouse%,10,112,31,1,1) THEN
  1305.   Mess$(1) = " You Answered YES "
  1306. ELSE
  1307.   Mess$(1) = " You Answered NO "
  1308. END IF
  1309.  
  1310. Mess$(2) = ""
  1311. DIALOG Mess$(),"",0,Mouse%,1,0,0,4,112,1,1
  1312.  
  1313. RETURN
  1314. '----------------------------------------------------------------------------
  1315. QuestionDemo:
  1316. REDIM TempMessage$(1:2)
  1317. CorrectAnswer$ = "y"
  1318. TempMessage$(1) = "DNA Library is the best freeware library available ?"
  1319.  
  1320. IF Question%(TempMessage$(),CorrectAnswer$,Mouse%,31,112,4,1,1) THEN
  1321.   Noise 1
  1322. ELSE
  1323.   Noise 6
  1324. END IF
  1325. '----------------------------------------------------------------------------
  1326. REDIM TempMessage$(1:7)
  1327. CorrectAnswer$ = "c"
  1328. TempMessage$(1) = "The best Basic compiler on the market is?"
  1329. TempMessage$(2) = " "
  1330. TempMessage$(3) = "(A) MicroSoft Visual Basic for Dos."
  1331. TempMessage$(4) = "(B) GFA Basic for Dos."
  1332. TempMessage$(5) = "(C) PowerBASIC version 3."
  1333. TempMessage$(6) = "(D) None of the above"
  1334.  
  1335. IF Question%(TempMessage$(),CorrectAnswer$,Mouse%,31,112,4,1,1) THEN
  1336.   Noise 1
  1337. ELSE
  1338.   Noise 6
  1339. END IF
  1340. '----------------------------------------------------------------------------
  1341. REDIM TempMessage$(1:3)
  1342. CorrectAnswer$ = "t"
  1343. TempMessage$(1) = "This is a good routine and may"
  1344. TempMessage$(2) = "come in handy some day."
  1345.  
  1346. IF Question%(TempMessage$(),CorrectAnswer$,Mouse%,31,112,4,1,1) THEN
  1347.   Noise 1
  1348. ELSE
  1349.   Noise 6
  1350. END IF
  1351.  
  1352. RETURN
  1353. '----------------------------------------------------------------------------
  1354. FutureFeatures:
  1355.  
  1356. Future$(1) = "I am currently working on an ASCII / ANSI communications terminal"
  1357. Future$(2) = "with XModem transfer, and dialing directory etc so keep watching."
  1358. Future$(3) = "I am also working on a virtual form generator, and various other"
  1359. Future$(4) = "goodies, which I expect will take a few months to finish."
  1360. Future$(5) = "And last but probably most importantly."
  1361. Future$(6) = "The Manual and online help will be ready for this fall."
  1362.  
  1363.  
  1364.  
  1365. DIALOG Future$(),VRtrn$ + " Features",0,Mouse%,3,0,0,4,112,1,1
  1366.  
  1367. RETURN
  1368. '----------------------------------------------------------------------------
  1369. AboutDNA:
  1370.  
  1371. About$(1) = "DNA Library for PowerBASIC version 3"
  1372. About$(2) = "by Chris Foot"
  1373. About$(3) = " "
  1374. About$(4) = "DNALIB is totally free and comes with source code"
  1375. About$(5) = "for you to modify to your own needs.  Please dont"
  1376. About$(6) = "distribute modified copies of DNALIB, if you find"
  1377. About$(7) = "a bug please let me know.   If you have any ideas"
  1378. About$(8) = "for improvements, or routines for the library.   "
  1379. About$(9) = " "
  1380. About$(10) = "I can be reached on BASNET in the PowerBASIC echo"
  1381. About$(11) = "or at this address                               "
  1382. About$(12) = "                               15305 - 117 avenue"
  1383. About$(13) = "                                Edmonton, Alberta"
  1384. About$(14) = "FAX (403)452-5969                 CANADA, T5M 3X4"
  1385.  
  1386. DIALOG About$(),"",0,Mouse%,3,0,0,14,31,1,1
  1387.  
  1388. RETURN
  1389. '----------------------------------------------------------------------------
  1390. ErrorMessage:
  1391.  
  1392. EMess$(1) = "In order to fully run all the Demos"
  1393. EMess$(2) = "there are several files which need to"
  1394. EMess$(3) = "be in the current directory."
  1395. EMess$(4) = "These are the files required for the Demo."
  1396. EMess$(5) = "DNAWRITE.EXE & DNA.DOC"
  1397. EMess$(6) = " "
  1398. EMess$(7) = "Also run the MAKEHELP.BAT and then press F1"
  1399. EMess$(8) = "when any of the menus are down, or you are"
  1400. EMess$(9) = "viewing the Lotus or ScrollMenu Demos."
  1401.  
  1402. DIALOG EMess$(),"",0,Mouse%,3,0,0,0,116,1,1
  1403.  
  1404. RETURN
  1405. '----------------------------------------------------------------------------
  1406.