5748118 [rkeene@sledge /home/rkeene/devel/archive/quickbasic]$ cat -n samplew3.bas
   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
   9: 
  10:    rem $ICON: 'SAMPLEW3.ICO'
  11:    rem windows size 10,2,70,19
  12: 
  13:    REM windows name "Font Demonstration"
  14: 
  15: 
  16: 
  17:    rem
  18:    rem Before going into graphics mode say we are handling paint.  If we
  19:    rem wait and do this after SCREEN command then a big bitmap would be
  20:    rem created (during SCREEN command) and then deleted (during ON PAINT).
  21:    rem
  22:    on paint gosub 1000
  23:    screen 1000
  24:    a=mouseon
  25:    mode=system(7)
  26:    position 10,50,550,450
  27:    line (0,0)-(550,450),7,bf
  28: 
  29:    color 1,7
  30: 
  31:    createfont 1,30,0,0,0,0,0,0,0,0,0,0,0,0,""
  32:    createfont 2,40,0,0,0,0,0,0,0,3,0,0,0,&h40,""
  33:    createfont 3,50,0,0,0,0,1,0,0,3,0,0,0,&h40,""
  34:    createfont 4,30,0,0,0,0,0,0,0,3,0,0,0,"COURIER"
  35:    createfont 5,40,0,0,0,0,0,1,0,3,0,0,0,"COURIER"
  36:    createfont 6,40,0,0,0,900,0,0,0,3,0,0,0,0,""
  37: 
  38:    selectfont 1
  39: '   FOR I=1 TO 1000:NEXT I
  40:    GOSUB DELAY
  41:    locate 10,40
  42:    print "Roses are red";
  43:    GOSUB DELAY
  44:    locate 70,40
  45:    selectfont 3
  46:    print "Violets are blue";
  47:    GOSUB DELAY
  48:    locate 140,40
  49:    SELECTFONT 4
  50:    print "Register this program";
  51:    GOSUB DELAY
  52:    locate 210,40
  53:    selectfont 5
  54:    print "And I'll love you.";
  55:    gosub delay
  56:    locate 280,40
  57:    selectfont 6
  58:    print "....Mark";
  59: 
  60: 100
  61:    b=mouseb
  62:    b=b and 1
  63:    if b=0 then goto 100
  64:    STOP
  65: 
  66: 
  67: DELAY:
  68:    FOR I=1 TO 2500:NEXT I
  69:    RETURN
  70: 
  71: 
  72: 1000
  73:    return
  74: 
5748119 [rkeene@sledge /home/rkeene/devel/archive/quickbasic]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2000-05-09 21:09:12