home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM 1995 Fall / PD-ROM F95.toast / Programming / Programming Languages / PC Basic ƒ / PCBASIC MPW version / PCBASIC Demo / PCBASICDemo.b.o / PCBASICDemo.b.o.rsrc / STR#_504.txt < prev    next >
Encoding:
Text File  |  1992-02-22  |  678 b   |  39 lines

  1.     Dialogs and alert boxes are easy to create with
  2.  
  3. PCBASIC. One BASIC statement will show the operator
  4.  
  5. a Modal Dialog or an Alert, wait for the operator to make
  6.  
  7. a selection or edit text, and return when the operator
  8.  
  9. pushes a button. It is as simple as this:
  10.  
  11.  
  12.  
  13.       REM Display alert box 500 as a Stop Alert.
  14.  
  15.       REM The number of the button the operator
  16.  
  17.       REM pressed will be in CHOICE%.
  18.  
  19.       100 CHOICE%=ERROR(501,STOP)
  20.  
  21.  
  22.  
  23.       REM Display dialog 500. Wait for a reply. The
  24.  
  25.       REM button number will be in CHOICE%.
  26.  
  27.       CHOICE%=DIALOG#500
  28.  
  29.  
  30.  
  31.       REM Remove the box. The blank spot on the window
  32.  
  33.       REM beneath the box will be drawn again, automaticaly
  34.  
  35.         CLOSE#500
  36.  
  37. END
  38.  
  39.