home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / dlghelp.zip / DLGDEMO.ZIP / DLGDEMO.SC < prev    next >
Text File  |  1995-09-26  |  21KB  |  654 lines

  1. PROC dlgdemo()
  2.  
  3. WHILE true
  4.  
  5.   SHOWPULLDOWN
  6.   "Tools" : "Dialog Box Generation Tools" : "Tools"
  7.       SUBMENU
  8.          "Push Button"    : "Push Buttons and Text Only"          : "Push",
  9.          "Accept"         : "Type-in Boxes and Push Buttons"      : "Accept",
  10.          "Check Box"      : "Check Boxes"                         : "Check",
  11.          "Radio Button"   : "Radio Buttons"                       : "Radio",
  12.          "Pic~k~list"     : "Picklist, Type-in Box, Push Buttons" : "Pick",
  13.          "Message Window" : "Non-modal, 18 Lines of Text"         : "MsgWin"
  14.       ENDSUBMENU,         
  15.   "Utilities" : "Dialog Box Utilities" : "Utilities"
  16.       SUBMENU
  17.          "C~l~ock"          : "Running Clock"      : "Clock",
  18.          "Color"            : "Color Selection"    : "Color",
  19.          "Export"           : "Export Table"       : "Export",
  20.          "Find Record"      : "Search"             : "Find",
  21.          "Search & ~R~eplace" : "Search and Replace" : "SR",
  22.          "System Info"    : "System Information" : "SysInfo"
  23.       ENDSUBMENU,         
  24.   "Register" : "Enter Registration Password to Unprotect Scripts" : "Register",
  25.   "About"    : "About dlgHELP 1.0 and dlgHELP Demo"               : "About",
  26.   "Help"     : "How to use dlgHELP Demo"                          : "Help",
  27.   "Exit"     : "Quit Demo"                                        : "Exit"
  28.   ENDMENU
  29.  
  30.   ECHO NORMAL
  31.   ECHO OFF
  32.   Splash()
  33.   GETMENUSELECTION KEYTO KeyVar TO MenuItem
  34.   WINDOW SELECT splashhandle
  35.   WINDOW CLOSE 
  36.   SWITCH
  37.   CASE MenuItem="Push"    : Tool(1)
  38.   CASE MenuItem="Accept"  : Tool(2)
  39.   CASE MenuItem="Check"   : Tool(3)
  40.   CASE MenuItem="Radio"   : Tool(4)
  41.   CASE MenuItem="Pick"    : Tool(5)
  42.   CASE MenuItem="MsgWin"  : Tool(6)
  43.   CASE MenuItem="Clock"   : Clock()
  44.   CASE MenuItem="Color"   : Color()
  45.   CASE MenuItem="Export"  : Export()
  46.   CASE MenuItem="Find"    : Srch()
  47.   CASE MenuItem="SR"      : SrchAndRep()
  48.   CASE MenuItem="SysInfo" : SysInf()
  49.   CASE MenuItem="Register": 
  50.        if isfile("Register.sc") then
  51.           PLAY "Register"
  52.        else
  53.           pushdlg("File Not Found","Registration script not in current directory","OK","H",0,0,"")
  54.        endif
  55.   CASE MenuItem="About"   : About()
  56.   CASE MenuItem="Help"    : HelpMe()
  57.   CASE MenuItem="Exit"    : QUIT
  58.   ENDSWITCH
  59. ENDWHILE
  60. endproc
  61.  
  62. Proc Splash()
  63. PRIVATE splashwinatt
  64.  
  65. DYNARRAY splashwinatt[]
  66. splashwinatt["CANVASHEIGHT"]=15
  67. splashwinatt["CANVASWIDTH"]=63
  68. splashwinatt["FLOATING"]=True
  69. splashwinatt["HEIGHT"]=17
  70. splashwinatt["WIDTH"]=65
  71. splashwinatt["ORIGINROW"]=5
  72. splashwinatt["ORIGINCOL"]=7
  73. splashwinatt["HASFRAME"]=False
  74. splashwinatt["CANMOVE"]=False
  75. splashwinatt["CANCLOSE"]=False
  76. splashwinatt["ECHO"]=True
  77. splashwinatt["HASSHADOW"]=True
  78.  
  79. blackOnLightGray=112
  80. blueOnLightGray=113
  81. redOnLightGray=116
  82. lightRedOnLightGray=124
  83. yellowOnLightGray=126
  84. whiteOnLightGray=127
  85. yellowOnLightGrayBlinking=254
  86.  
  87. WINDOW CREATE ATTRIBUTES splashwinatt TO splashhandle
  88. PAINTCANVAS ATTRIBUTE blackOnLightGray ALL
  89. STYLE ATTRIBUTE blackOnLightGray
  90. @ 3 , 6 ?? "        █         "
  91. @ 4 , 6 ?? "       ▐▐█        "
  92. @ 5 , 6 ?? "      ▐▐ ██       "
  93. @ 6 , 6 ?? "     ▐▐   ██      "
  94. @ 7 , 6 ?? "    ▐▐     ██     "
  95. @ 8 , 6 ?? "   ▐▐       ██    "
  96. @ 9 , 6 ?? "  ▐▐▐▐     ████   "
  97. @ 10, 6 ?? " ▐▐▐▐▐▐   ██████  "
  98. @ 11, 6 ?? "▐▐▐▐▐▐▐▐ ████████ "
  99.  
  100. Style Attribute yellowOnLightGrayBlinking
  101. @ 5,14 ??      "░"
  102. @ 6,13 ??     "░▒░"
  103. @ 7,12 ??    "░▒▓▒░"
  104. @ 8,11 ??   "░▒▓█▓▒░"
  105. @ 9,12 ??    "░▒▓▒░"
  106. @ 10,13??     "░▒░"
  107. @ 11,14??      "░"
  108. Style Attribute lightRedOnLightGray
  109. @ 6,14 ??   "▒"
  110. @ 7,13 ??  "▒▒▒"
  111. @ 8,12 ?? "▒▒█▒▒"
  112. @ 9,13 ??  "▒▓▒"
  113. @10,14 ??   "▒"
  114. Style Attribute redOnLightGray
  115. @ 7,14 ??  "▒"
  116. @ 8,13 ?? "▒█▒"
  117. Style Attribute blueOnLightGray
  118. @ 8,14 ?? "█"
  119. @ 9,14 ?? "▒"
  120. @10,14 ?? "▒" 
  121. Style Attribute redOnLightGray
  122. @ 4, 31 ?? Format("AC,W23","Demo For dlgHELP 1.0a")
  123. Style Attribute yellowOnLightGray
  124. @ 5, 31 ?? Format("AC,W23","A Library of Dialog Box")
  125. @ 6, 31 ?? Format("AC,W23","Tools and Utilities")
  126. Style Attribute blueOnLightGray
  127. @ 8, 31 ?? Format("AC,W22","Developed By")
  128. @ 9, 31 ?? Format("AC,W22","William A. Bailey, Jr.")
  129. @ 10, 31 ?? Format("AC,W22","Copyright 1995")
  130.  
  131. STYLE ATTRIBUTE blackOnLightGray
  132. FRAME DOUBLE FROM 0,0 TO 14, 62
  133. PAINTCANVAS BORDER ATTRIBUTE whiteOnLightGray 0,0,14,62
  134. FRAME SINGLE FROM 2,4 TO 12,24
  135. PAINTCANVAS ATTRIBUTE whiteOnLightGray 2,4,2,23
  136. PAINTCANVAS ATTRIBUTE whiteOnLightGray 2,4,12,4
  137. FRAME SINGLE FROM 2,26 TO 12,58
  138. PAINTCANVAS ATTRIBUTE whiteOnLightGray 2,26,2,57
  139. PAINTCANVAS ATTRIBUTE whiteOnLightGray 2,26,12,26
  140. FRAME SINGLE FROM 7,29 TO 11,54
  141. PAINTCANVAS ATTRIBUTE whiteOnLightGray 11,30,11,54
  142. PAINTCANVAS ATTRIBUTE whiteOnLightGray 7,54,11,54
  143.  
  144. Endproc
  145.  
  146. Proc Tool(toolNumber)
  147. DYNARRAY wa_bag[]
  148. wa_bag["HASFRAME"]=FALSE
  149. wa_bag["MAXIMIZED"]=TRUE
  150. wa_bag["CANVASHEIGHT"]=25
  151. wa_bag["CANVASWIDTH"]=80
  152. SHOWPULLDOWN ENDMENU
  153. PROMPT "Press [F2] to generate dialog box, [Esc] to cancel..."
  154. EDIT "demobox"
  155. pickform toolnumber
  156. WINDOW HANDLE FORM TO MasterFileHandle
  157. WINDOW SETATTRIBUTES MasterFileHandle FROM wa_bag
  158. while true
  159. if sysmode()<>"Edit" then EDITKEY endif
  160. IF TABLE()="Demobox" then
  161.    WAIT RECORD
  162.    UNTIL "Esc", "F2", "F3", "F4", "Tab"
  163. ELSE
  164.    WAIT TABLE
  165.    UNTIL "Esc", "F2", "F3", "F4", "Tab"
  166. ENDIF
  167. switch
  168.    case retval="F2" :
  169.      DO_IT!
  170.      switch
  171.      case toolnumber=1:
  172.         moveto "demobox"
  173.         if isempty(table()) then
  174.            pushdlg("Missing Data","No data has been entered","~O~K","H",0,0,"Black")
  175.            loop
  176.         endif
  177.         boxtitle=[Box Title]
  178.         align=[Align]
  179.         r=[r]
  180.         c=[c]
  181.         textcolor=[textcolor]
  182.         moveto "msgline"
  183.         if isempty(table()) then
  184.            msg=""
  185.         else
  186.            array msg[nimagerecords()]
  187.            i=0
  188.            scan
  189.               i=i+1
  190.               msg[i]=[msgline->Text Line]
  191.            endscan
  192.         endif
  193.         moveto "label"
  194.         if isempty(table()) then
  195.            pushdlg("Missing Data","Must enter button label(s)","~O~K","H",0,0,"Black")
  196.            loop
  197.         endif
  198.         array bl[nimagerecords()]
  199.         i=0
  200.         scan
  201.            i=i+1
  202.            bl[i]=[Label]
  203.         endscan
  204.         CLEARALL
  205.         PROMPT ""
  206.         echo normal
  207.         echo off
  208.         pushdlg(boxtitle,msg,bl,align,r,c,textcolor)
  209.         pushdlg("Global Variable Settings","buttonvalue= "+buttonvalue,"OK","H",0,0,"Black")
  210.      case toolnumber=2:
  211.         moveto "demobox"
  212.         if isempty(table()) then
  213.            pushdlg("Missing Data","No data has been entered","~O~K","H",0,0,"Black")
  214.            loop
  215.         endif
  216.         boxtitle=[Box Title]
  217.         r=[r]
  218.         c=[c]
  219.         textcolor=[textcolor]
  220.         moveto "accept"
  221.         if isempty(table()) then
  222.            pushdlg("Missing Data","Must enter type-in box label(s)","~O~K","H",0,0,"Black")
  223.            loop
  224.         endif
  225.         array al[nimagerecords()]
  226.         array aw[nimagerecords()]
  227.         array gv[nimagerecords()+1]
  228.         i=0
  229.         x=false
  230.         scan
  231.            i=i+1
  232.            if isblank([accept->Label]) or isblank([accept->Width]) then
  233.               pushdlg("Missing Data","Type-in box label or width cannot be blank","~O~K","H",0,0,"Black")
  234.               x=true
  235.               quitloop
  236.            endif
  237.            al[i]=[accept->Label]
  238.            aw[i]=[accept->Width]
  239.         endscan
  240.         if x then loop endif
  241.         moveto "label"
  242.         if isempty(table()) then
  243.            pushdlg("Missing Data","Must enter button label(s)","~O~K","H",0,0,"Black")
  244.            loop
  245.         endif
  246.         array bl[nimagerecords()]
  247.         i=0
  248.         scan
  249.            i=i+1
  250.            bl[i]=[Label]
  251.         endscan
  252.         CLEARALL
  253.         PROMPT ""
  254.         echo normal
  255.         echo off
  256.         acceptdlg(boxtitle,al,aw,bl,r,c,textcolor)
  257.         for i from 1 to arraysize(al)
  258.             gv[i]="acceptvalue["+strval(i)+"]= "+strval(acceptvalue[i])
  259.         endfor
  260.         gv[arraysize(gv)]="buttonvalue= "+buttonvalue
  261.         pushdlg("Global Variable Settings",gv,"OK","H",0,0,"Black")
  262.      case toolnumber=3:
  263.         moveto "demobox"
  264.         if isempty(table()) then
  265.            pushdlg("Missing Data","No data has been entered","~O~K","H",0,0,"Black")
  266.            loop
  267.         endif
  268.         boxtitle=[Box Title]
  269.         r=[r]
  270.         c=[c]
  271.         textcolor=[textcolor]
  272.         frametitle=[Frame Title]
  273.         checkrows=[rows]
  274.         moveto "check"
  275.         if isempty(table()) then
  276.            pushdlg("Missing Data","Must enter check box label(s)","~O~K","H",0,0,"Black")
  277.            loop
  278.         endif
  279.         array bl[nimagerecords()]
  280.         array gv[nimagerecords()+1]
  281.         i=0
  282.         scan
  283.            i=i+1
  284.            bl[i]=[Label]
  285.         endscan
  286.         CLEARALL
  287.         PROMPT ""
  288.         echo normal
  289.         echo off
  290.         checkdlg(boxtitle,frametitle,bl,checkrows,r,c,textcolor)
  291.         for i from 1 to arraysize(bl)
  292.             gv[i]="checkvalue["+strval(i)+"]= "+strval(checkvalue[i])
  293.         endfor
  294.         gv[arraysize(gv)]="buttonvalue= "+buttonvalue
  295.         pushdlg("Global Variable Settings",gv,"OK","H",0,0,"Black")
  296.      case toolnumber=4:
  297.         moveto "demobox"
  298.         if isempty(table()) then
  299.            pushdlg("Missing Data","No data has been entered")
  300.            loop
  301.         endif
  302.         boxtitle=[Box Title]
  303.         r=[r]
  304.         c=[c]
  305.         textcolor=[textcolor]
  306.         frametitle=[Frame Title]
  307.         radiorows=[rows]
  308.         moveto "check"
  309.         if isempty(table()) then
  310.            pushdlg("Missing Data","Must enter radio button label(s)","~O~K","H",0,0,"Black")
  311.            loop
  312.         endif
  313.         array bl[nimagerecords()]
  314.         i=0
  315.         scan
  316.            i=i+1
  317.            bl[i]=[Label]
  318.         endscan
  319.         CLEARALL
  320.         PROMPT ""
  321.         echo normal
  322.         echo off
  323.         radiodlg(boxtitle,frametitle,bl,radiorows,r,c,textcolor)
  324.         array gv[2]
  325.         gv[1]="radiovalue = "+strval(radiovalue)
  326.         gv[2]="buttonvalue= "+buttonvalue
  327.         pushdlg("Global Variable Settings",gv,"OK","H",0,0,"Black")
  328.      case toolnumber=5:
  329.         moveto "demobox"
  330.         if isempty(table()) then
  331.            pushdlg("Missing Data","No data has been entered","~O~K","H",0,0,"Black")
  332.            loop
  333.         endif
  334.         boxtitle=[Box Title]
  335.         align=[align]
  336.         r=[r]
  337.         c=[c]
  338.         textcolor=[textcolor]
  339.         frametitle=[Frame Title]
  340.         acceptlabel=[Accept Label]
  341.         pickrows=[rows]
  342.         pickcolumns=[columns]
  343.         moveto "label"
  344.         if isempty(table()) then
  345.            pushdlg("Missing Data","Must enter button label(s)","~O~K","H",0,0,"Black")
  346.            loop
  347.         endif
  348.         array bl[nimagerecords()]
  349.         i=0
  350.         scan
  351.            i=i+1
  352.            bl[i]=[Label]
  353.         endscan
  354.         moveto "picklist"
  355.         if isempty(table()) then
  356.            pushdlg("Missing Data","Must enter picklist value(s)","~O~K","H",0,0,"Black")
  357.            loop
  358.         endif
  359.         array pl[nimagerecords()]
  360.         i=0
  361.         scan
  362.            i=i+1
  363.            pl[i]=[List Selection]
  364.         endscan
  365.         CLEARALL
  366.         PROMPT ""
  367.         echo normal
  368.         echo off
  369.         pickdlg(boxtitle,frametitle,acceptlabel,pl,bl,pickrows,pickcolumns,align,r,c,textcolor)
  370.         array gv[3]
  371.         gv[1]="acceptvalue= "+strval(acceptvalue)
  372.         gv[2]="pickvalue  = "+strval(pickvalue)
  373.         gv[3]="buttonvalue= "+buttonvalue
  374.         pushdlg("Global Variable Settings",gv,"OK","H",0,0,"Black")
  375.      case toolnumber=6:
  376.         moveto "demobox"
  377.         if isempty(table()) then
  378.            pushdlg("Missing Data","No data has been entered","~O~K","H",0,0,"Black")
  379.            loop
  380.         endif
  381.         boxtitle=[Box Title]
  382.         moveto "msgline"
  383.         if isempty(table()) then
  384.            pushdlg("Missing Data","Must enter message line(s)","~O~K","H",0,0,"Black")
  385.            loop
  386.         endif
  387.         array msg[nimagerecords()]
  388.         i=0
  389.         scan
  390.            i=i+1
  391.            msg[i]=[msgline->Text Line]
  392.         endscan
  393.         CLEARALL
  394.         PROMPT ""
  395.         echo normal
  396.         echo off
  397.         msgWin(boxtitle,msg)
  398.         for i from 1 to 1000
  399.             message "Record "+strval(i)
  400.         endfor
  401.         window select msgwinhandle
  402.         window close
  403.         message ""
  404.      endswitch
  405.      quitloop
  406.    case retval="F3" or retval="Tab" : UPIMAGE
  407.    case retval="F4"  : DOWNIMAGE
  408.    case retval="Esc" :
  409.         DO_IT!
  410.         CLEARALL
  411.         quitloop
  412. endswitch
  413. endwhile
  414. endproc
  415.  
  416. Proc clock()
  417. if not isassigned(clockRow) then;   
  418.     dlgRow=5
  419.     dlgCol=26
  420. else
  421.    dlgRow=ClockRow
  422.    dlgCol=ClockCol
  423. endif
  424. message "Click and Drag on Title Bar to Move Around"
  425. ClockDlg()
  426. message "dlgRow="+strval(dlgRow)+" dlgCol="+strval(dlgCol)
  427. ClockRow=dlgRow
  428. ClockCol=dlgCol
  429. endproc
  430.  
  431. Proc color()
  432. message "Press Enter to see picklist.  Click on Display button to see color sample."
  433. ColorDlg()
  434. message "AcceptValue="+acceptvalue+"  PickValue="+strval(pickvalue)+"  ButtonValue="+strval(buttonvalue)
  435. endproc
  436.  
  437. Proc export()
  438. if not isassigned(expRow) then
  439.    dlgRow=4
  440.    dlgCol=20
  441. else
  442.    dlgRow=expRow
  443.    dlgCol=expCol
  444. endif
  445. message "Click and Drag on Title Bar to Move.  Note: Directory name must end with a \\."
  446. ExportDlg()
  447. expRow=dlgRow
  448. expCol=dlgCol
  449. message "ExportFileName="+exportfilename+
  450.         "  ExportDirectory="+exportdirectory+
  451.         "  ExportType="+strval(exporttype)+
  452.         "  ButtonValue="+buttonvalue+
  453.         "  dlgRow="+strval(dlgrow)+"  dlgCol="+strval(dlgcol)
  454. endproc
  455.  
  456. Proc srch()
  457. VIEW "Customer"
  458. WHILE true
  459. WINMAX
  460. WAIT TABLE 
  461. PROMPT "Press Esc to End.  Move to field, then press Ctrl-Z to search."
  462. UNTIL "Esc","Zoom"
  463. switch
  464.   case retval="Esc": 
  465.      DO_IT!
  466.      CLEARALL 
  467.      QUITLOOP
  468.   case retval="Zoom": 
  469.      if not isassigned(srchRow) then
  470.         dlgRow=3
  471.         dlgCol=15
  472.      else
  473.         dlgRow=srchRow
  474.         dlgCol=srchCol
  475.      endif
  476.      message "Click and Drag on Title Bar to Move.  Note:  You can use Paradox search operators, such as .. and @."
  477.      FindRecord()
  478.      srchRow=dlgRow
  479.      srchCol=dlgCol
  480.      message "SearchValue="+searchvalue+"  ButtonValue="+buttonvalue+
  481.              "  dlgRow="+strval(dlgRow)+"  dlgCol"+strval(dlgCol)
  482. endswitch
  483. ENDWHILE
  484. endproc
  485.  
  486. Proc SrchAndRep()
  487. COEDIT "Customer"
  488. WINMAX
  489. WHILE true
  490. WAIT TABLE 
  491. PROMPT "Press Esc to End.  Move to field, then press Ctrl-A to search/replace."
  492. UNTIL "Esc","Replace"
  493. switch
  494.   case retval="Esc": 
  495.      DO_IT!
  496.      CLEARALL 
  497.      QUITLOOP
  498.   case retval="Replace": 
  499.      if not isassigned(srRow) then
  500.         dlgRow=4
  501.         dlgCol=20
  502.      else
  503.         dlgRow=srRow
  504.         dlgCol=srCol
  505.      endif
  506.      message "Click and Drag on Title Bar to Move.  Note:  You can use Paradox search operators, such as .. and @."
  507.      SearchAndReplace()
  508.      srRow=dlgRow
  509.      srCol=dlgCol
  510.      message "SearchValue="+searchvalue+"  ButtonValue="+buttonvalue+
  511.              "  dlgRow="+strval(dlgRow)+"  dlgCol"+strval(dlgCol)
  512. endswitch
  513. ENDWHILE
  514. endproc
  515.  
  516. Proc sysinf()
  517. if not isassigned(sysRow) then;   
  518.     dlgRow=4
  519.     dlgCol=21
  520. else
  521.    dlgRow=sysRow
  522.    dlgCol=sysCol
  523. endif
  524. message "Click and Drag on Title Bar to Move Around"
  525. SysInfoDlg()
  526. message "dlgRow="+strval(dlgRow)+" dlgCol="+strval(dlgCol)
  527. sysRow=dlgRow
  528. sysCol=dlgCol
  529. endproc
  530.  
  531. proc about()
  532. array msg[16]
  533. msg[1]="dlgHELP 1.0a is a library of 12 Paradox for DOS    "
  534. msg[2]="(4.x) procedures that are divided into two types:  "
  535. msg[3]="  1) general purpose dialog box generation tools   "
  536. msg[4]="  2) special purpose dialog box utilities.         "
  537. msg[5]=""
  538. msg[6]="This demo illustrates each of the procedures and,  "
  539. msg[7]="in fact, this dialog box was created using dlgHELP."
  540. msg[8]="The manual contains more detailed descriptions of  "
  541. msg[9]="how to use each one.                               "
  542. msg[10]=""
  543. msg[11]="dlgHELP is shareware.  If you like it and intend to"
  544. msg[12]="use it, the registration fee is $15.  Registered   "
  545. msg[13]="users will be provided with a password that will   "
  546. msg[14]="allow read/write access to the scripts that make up"
  547. msg[15]="the library.  Note:  the demo script (dlgdemo.sc)  "
  548. msg[16]="is not protected.                                  "
  549. array msg1[17]
  550. msg1[1]="The easiest way to register is via CompuServes Shareware "
  551. msg1[2]="Registration (GO SWREG). My registration ID is 7456.     "
  552. msg1[3]=""
  553. msg1[4]="Otherwise, you can send money to:                        "
  554. msg1[5]=""
  555. msg1[6]="             William A. Bailey, Jr.                      "
  556. msg1[7]="             9017 Gamesford Drive                        "
  557. msg1[8]="             Charlotte, NC  28277                        "
  558. msg1[9]=""
  559. msg1[10]="Don't forget to include an e-mail address so I can return"
  560. msg1[11]="the decryption password.  If the money is in the mail and"
  561. msg1[12]="you don't want to wait for the password, just send me a  "
  562. msg1[13]="note at one of the following and I'll give it to you:    "
  563. msg1[14]=""
  564. msg1[15]="CompuServe: 102011,707                                   "
  565. msg1[16]="AOL: bbaileyjr                                           " 
  566. msg1[17]="Internet: bailey@vnet.net                                "  
  567.  
  568. array pb[2]
  569. pb[1]="How to Register"
  570. pb[2]="OK"
  571.  
  572. bv="How to Register"
  573. while bv="How to Register"
  574.   PushDlg("About dlgHELP",msg,pb,"V",0,0,"Yellow")
  575.   bv=buttonvalue
  576.   if bv="How to Register" then
  577.      PushDlg("How to Register",msg1,"OK","H",0,0,"Blue")
  578.   endif
  579. endwhile
  580. endproc
  581.  
  582. proc helpme()
  583. array msg[17]
  584. msg[1]="dlgHELP Demo illustrates each of the 12 dialog     "
  585. msg[2]="box generation tools and utilities that make up the"
  586. msg[3]="dlgHELP library.  The demo menu reflects the two   "
  587. msg[4]="basic types of procedures:  tools and utilities.   "
  588. msg[5]="With respect to implementation, there is one basic "
  589. msg[6]="difference:  the dialog box generation tools       "
  590. msg[7]="require you to pass parameters that define the     "
  591. msg[8]="dialog box controls and features whereas the       "
  592. msg[9]="utility procedures just need to be called.  You can"
  593. msg[10]="also register from this demo if the demo is       "
  594. msg[11]="installed in your dlgHELP directory.              "
  595. msg[12]=""
  596. msg[13]="This demo is provided to assist your evaluation of"
  597. msg[14]="dlgHELP.  It is *not* intended to be an example of"
  598. msg[15]="an 'airtight' or polished Paradox application.  It"
  599. msg[16]="is very functional if you use it right, but it is "
  600. msg[17]="not user-proof.                                   "
  601. array msg1[15]
  602. msg1[1]="Select the tool which you wish to demo from the  "
  603. msg1[2]="drop-down menu under 'Tools'.  A form will appear"
  604. msg1[3]="to let you fill in the values for the parameters "
  605. msg1[4]="required by the dialog box procedure.  Default   "
  606. msg1[5]="values may alreay be in some of the fields.  The "
  607. msg1[6]="multi-record embedded tables are for labels and  "
  608. msg1[7]="message text lines.  **Make sure you enter the # "
  609. msg1[8]="of the label or line, otherwise your buttons and/"
  610. msg1[9]="or lines may be in a different order than you    "
  611. msg1[10]="expect or you may get a key violation error.**   "
  612. msg1[11]="Press [F2] to generate the dialog box.  When you "
  613. msg1[12]="select a pushbutton, the values of the global    "
  614. msg1[13]="variables assigned by the procedure will be dis- "
  615. msg1[14]="played on the screen.  Please reference the      "
  616. msg1[15]="manual for further details about each procedure. "
  617. array msg2[8]
  618. msg2[1]="Select the utility which you wish to demo from   "
  619. msg2[2]="the drop-down menu under 'Tools'.  The dialog box"
  620. msg2[3]="should appear on the screen.  That's it!  When   "
  621. msg2[4]="you exit the dialog box (by pressing one of the  "
  622. msg2[5]="pushbuttons), the values of the global variables "
  623. msg2[6]="assigned by the procedure will be displayed on   "
  624. msg2[7]="the screen.  Please reference the manual for     "
  625. msg2[8]="further details about each procedure.            "
  626. array msg3[5]
  627. msg3[1]="If the dlgDemo files are in the same directory as your   "
  628. msg3[2]="dlgHELP scripts, then you can register (i.e. enter your  "
  629. msg3[3]="password to decrypt the scripts) via the 'Register'      "
  630. msg3[4]="option on the dlgDemo main menu. Instructions on how to  "
  631. msg3[5]="register and receive your password are also included.    "  
  632.  
  633. array pb[4]
  634. pb[1]="Tools Help"
  635. pb[2]="Utilities Help"
  636. pb[3]="Registration Help"
  637. pb[4]="OK"
  638.  
  639. while true
  640.   PushDlg("dlgDemo Help",msg,pb,"V",0,0,"Yellow")
  641.   bv=buttonvalue
  642.   switch
  643.   case bv="Tools Help":        PushDlg("Tools Help",msg1,"OK","H",0,0,"Blue")
  644.   case bv="Utilities Help":    PushDlg("Utilities Help",msg2,"OK","H",0,0,"Blue")
  645.   case bv="Registration Help": PushDlg("Registration Help",msg3,"OK","H",0,0,"Blue")
  646.   case isblank(bv):            quitloop
  647.   endswitch
  648. endwhile
  649. endproc
  650.  
  651. setuimode standard
  652. autolib="dlghelp"
  653. dlgdemo()
  654.