home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / compiler / sample14.bas < prev    next >
BASIC Source File  |  1993-11-15  |  2KB  |  78 lines

  1.  
  2.  
  3.    rem
  4.    rem This program demonstrates creating and using different fonts/sizes
  5.    rem
  6.    rem
  7.    rem It also demonstrates how to use an icon with a program.
  8.    rem This program works under Windows or DOS
  9.    rem
  10.  
  11.    rem $ICON: 'SAMPLE14.ICO'
  12.    rem windows size 10,2,70,19
  13.  
  14.    REM windows name "Font Demonstration"
  15.  
  16.  
  17.  
  18.    rem
  19.    rem Before going into graphics mode say we are handling paint.  If we
  20.    rem wait and do this after SCREEN command then a big bitmap would be
  21.    rem created (during SCREEN command) and then deleted (during ON PAINT).
  22.    rem
  23.  
  24.    screen 1000
  25.    a=mouseon
  26.    mode=system(7)
  27.    position 10,50,550,450
  28.    line (0,0)-(550,450),7,bf
  29.  
  30.    color 1,7
  31.  
  32.    createfont 1,30,0,0,0,0,0,0,0,0,0,0,0,0,""
  33.    createfont 2,40,0,0,0,0,0,0,0,3,0,0,0,&h40,""
  34.    createfont 3,50,0,0,0,0,1,0,0,3,0,0,0,&h40,""
  35.    createfont 4,30,0,0,0,0,0,0,0,3,0,0,0,"COURIER"
  36.    createfont 5,40,0,0,0,0,0,1,0,3,0,0,0,"COURIER"
  37.    createfont 6,40,0,0,0,900,0,0,0,3,0,0,0,0,""
  38.  
  39.    selectfont 1
  40. '   FOR I=1 TO 1000:NEXT I
  41.    GOSUB DELAY
  42.    locate 10,40
  43.    print "Roses are red";
  44.    GOSUB DELAY
  45.    locate 70,40
  46.    selectfont 3
  47.    print "Violets are blue";
  48.    GOSUB DELAY
  49.    locate 140,40
  50.    SELECTFONT 4
  51.    print "Register this program";
  52.    GOSUB DELAY
  53.    locate 210,40
  54.    selectfont 5
  55.    print "And I'll love you.";
  56.    gosub delay
  57.    locate 280,40
  58.    selectfont 6
  59.    print "....Mark";
  60.  
  61.  
  62.    DO WHILE INKEY$=""
  63.    LOOP
  64.    STOP
  65.  
  66.  
  67. DELAY:
  68.    FOR I=1 TO 2500:NEXT I
  69.    RETURN
  70.  
  71.  
  72. 1000
  73.    return
  74.  
  75.  
  76.  
  77.  
  78.