home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / Basic / STDLIB.ZIP / STDLIB.BAS < prev    next >
Encoding:
BASIC Source File  |  1990-10-04  |  6.8 KB  |  249 lines

  1. '****************************************************************************
  2. 'Total Control Systems                                         QuickBasic 4.5
  3. '****************************************************************************
  4. '
  5. '  Program     : STDLIB.BAS
  6. '  Written by  : Tim Beck
  7. '  Written On  : 10-01-90
  8. '  Function    : STANDARD LIBRARY
  9. '
  10. '****************************************************************************
  11. '  This program and those associated with it were written for use with Quick-
  12. '  Windows Advanced (Version 1.5+).  Possesion of this program entitles you
  13. '  to certain priviliges.  They are:
  14. '
  15. '     1. You may compile, use, or modify this program in any way you choose
  16. '        provided you do not sell or give away the source code to this prog-
  17. '        ram or any of it's companions to anyone for any reason.  You may,
  18. '        however, sell the resulting executable program as you see fit.
  19. '
  20. '     2. You may modify, enhance or change these programs as you see fit. I
  21. '        as that you keep a copy of the original code and that you notify
  22. '        me of any improvements you make.  I like to think that the code is
  23. '        bug free and cannot be improved upon, but I'm sure someone will
  24. '        find a way to make it better.  If it's you, I'm looking forward to
  25. '        seeing your changes.  I can be reached at:
  26. '
  27. '              Tim Beck                      Tim Beck (C/O Debbie Beck)
  28. '              19419 Franz Road              8030 Fairchild Avenue
  29. '              Houston, Texas  77084         Canoga Park, California 91306
  30. '              (713) 639-3079                (818) 998-0588
  31. '
  32. '     3. This code has been tested and re-tested in a variety of applications
  33. '        and although I have not found any bugs, doesn't mean none exist. So,
  34. '        this program along with it's companions comes with NO WARRANTY,
  35. '        either expressed or implied.  I'm sorry if there are problems, but
  36. '        I can't be responsible for your work.  I've tried to provide a safe
  37. '        and efficient programming enviroment and I hope you find it helpful
  38. '        for you.  I do, however, need to cover my butt!
  39. '
  40. '  I have enjoyed creating this library of programs and have found them to be
  41. '  a great time saver.  I hope you agree.
  42. '
  43. '                                                            Tim Beck //
  44. '
  45. '****************************************************************************
  46.  
  47.     REM $INCLUDE: 'STDCOM.INC'
  48.     REM $ INCLUDE : 'STDLIB.INC'        'Include is disabled
  49.  
  50.   'Initialization Items
  51.  
  52.   'KeyStrokes
  53.     Escape% = 27
  54.     Enter% = 13
  55.  
  56.     Left.Arrow% = 19200
  57.     Right.Arrow% = 19712
  58.     Up.Arrow% = 18432
  59.     Down.Arrow% = 20480
  60.     Page.Up% = 18688
  61.     Page.Down% = 20736
  62.  
  63.     Insert% = 20992
  64.     Delete% = 21248
  65.     Home% = 18176
  66.     End.Key% = 20224
  67.  
  68.     Back.Space% = 8
  69.     Horiz.Tab% = 9
  70.     Back.Tab% = 3840
  71.  
  72.     F.1% = 15104
  73.     F.2% = 15360
  74.     F.3% = 15616
  75.     F.4% = 15872
  76.     F.5% = 16128
  77.     F.6% = 16384
  78.     F.7% = 16640
  79.     F.8% = 16896
  80.     F.9% = 17152
  81.     F.10% = 17408
  82.  
  83.     Ctrl.Home% = 30464
  84.     Ctrl.End% = 29952
  85.     Ctrl.Pgup% = -31744
  86.     Ctrl.PgDn% = 30208
  87.     Ctrl.Right% = 29696
  88.     Ctrl.Left% = 29440
  89.  
  90.     Ctrl.A% = 1
  91.     Ctrl.B% = 2
  92.     Ctrl.C% = 3
  93.     Ctrl.D% = 4
  94.     Ctrl.E% = 5
  95.     Ctrl.F% = 6
  96.     Ctrl.G% = 7
  97.     Ctrl.H% = 8
  98.     Ctrl.I% = 9
  99.     Ctrl.J% = 10
  100.     Ctrl.K% = 11
  101.     Ctrl.L% = 12
  102.     Ctrl.M% = 13
  103.     Ctrl.N% = 14
  104.     Ctrl.O% = 15
  105.     Ctrl.P% = 16
  106.     Ctrl.Q% = 17
  107.     Ctrl.R% = 18
  108.     Ctrl.S% = 19
  109.     Ctrl.T% = 20
  110.     Ctrl.U% = 21
  111.     Ctrl.V% = 22
  112.     Ctrl.W% = 23
  113.     Ctrl.X% = 24
  114.     Ctrl.Y% = 25
  115.     Ctrl.Z% = 26
  116.  
  117.     Ctrl.F.1% = 24064
  118.     Ctrl.F.2% = 24320
  119.     Ctrl.F.3% = 24576
  120.     Ctrl.F.4% = 24832
  121.     Ctrl.F.5% = 25088
  122.     Ctrl.F.6% = 25344
  123.     Ctrl.F.7% = 25600
  124.     Ctrl.F.8% = 25856
  125.     Ctrl.F.9% = 26112
  126.     Ctrl.F.10% = 26368
  127.  
  128.     Alt.A% = 7680
  129.     Alt.B% = 12288
  130.     Alt.C% = 11776
  131.     Alt.D% = 8192
  132.     Alt.E% = 4608
  133.     Alt.F% = 8448
  134.     Alt.G% = 8704
  135.     Alt.H% = 8960
  136.     Alt.I% = 5888
  137.     Alt.J% = 9216
  138.     Alt.K% = 9472
  139.     Alt.L% = 9728
  140.     Alt.M% = 12800
  141.     Alt.N% = 12544
  142.     Alt.O% = 6144
  143.     Alt.P% = 6400
  144.     Alt.Q% = 4096
  145.     Alt.R% = 4864
  146.     Alt.S% = 7936
  147.     Alt.T% = 5120
  148.     Alt.U% = 5632
  149.     Alt.V% = 12032
  150.     Alt.W% = 4352
  151.     Alt.X% = 11520
  152.     Alt.Y% = 5376
  153.     Alt.Z% = 11264
  154.  
  155.     Alt.F.1% = 26624
  156.     Alt.F.2% = 26880
  157.     Alt.F.3% = 27136
  158.     Alt.F.4% = 27392
  159.     Alt.F.5% = 27648
  160.     Alt.F.6% = 27904
  161.     Alt.F.7% = 28160
  162.     Alt.F.8% = 28416
  163.     Alt.F.9% = 28672
  164.     Alt.F.10% = 28928
  165.  
  166.     Shift.Tab% = 3840
  167.  
  168.     Shift.F.1% = 21504
  169.     Shift.F.2% = 21760
  170.     Shift.F.3% = 22016
  171.     Shift.F.4% = 22272
  172.     Shift.F.5% = 22528
  173.     Shift.F.6% = 22784
  174.     Shift.F.7% = 23040
  175.     Shift.F.8% = 23296
  176.     Shift.F.9% = 23552
  177.     Shift.F.10% = 23808
  178.  
  179.     Key.Flag% = -1            'Returns Unused key values (F1, F2, etc)
  180.  
  181.   'Status Line Information
  182.     Display.Cap.Lock% = -1    'Cap.Lock Display is on
  183.     Display.Num.Lock% = -1    'Num.Lock Display is on
  184.     Display.Insert.Key% = -1  'Insert Key Display is on
  185.     Status.Line.Row% = 24     'Status Line Row = 24
  186.     Status.Line.Col% = 60     'Status Line Col = 60
  187.  
  188.     IF mono% THEN
  189.       'Colors - 15 is Brightwhite, 7 is White, 0 is black, 1 is blue
  190.         S.Fore% = 15      'Screen Foreground
  191.         S.Back% = 0       'Screen Background
  192.         M.Fore% = 7       'Menu Foreground
  193.         M.Back% = 0       'Menu Background
  194.         H.Fore% = 0       'Help Foreground
  195.         H.Back% = 7       'Help Background
  196.         DE.Fore% = 0      'Data Entry Foreground
  197.         DE.Back% = 7      'Data Entry Background
  198.         HB.Fore% = 0      'Highlight Bar Foreground
  199.         HB.Back% = 7      'Highlight Bar Background
  200.         MB.Fore% = 0      'Menu Bar Foreground
  201.         MB.Back% = 7      'Menu Bar Background
  202.  
  203.       'Attributes are calculated as follows:
  204.       '  Foreground + (Background * 16)
  205.         S.attr% = 15
  206.         M.attr% = 7
  207.         H.attr% = 112
  208.         DE.attr% = 112
  209.         HB.attr% = 112
  210.         MB.attr% = 112
  211.  
  212.         Sh.Flag% = 16           'Transparent Shadow (0=no Shadow, 16=Solid Shadow)
  213.         EX.Flag% = 0            'Exploding Windows off (128=On)
  214.  
  215.         mode% = 1               'MonoChrome
  216.     ELSE
  217.       'Colors - 15 is Brightwhite, 7 is White, 0 is black, 1 is blue, 4 is Red
  218.         S.Fore% = 15      'Screen Foreground
  219.         S.Back% = 1       'Screen Background
  220.         M.Fore% = 1       'Menu Foreground
  221.         M.Back% = 7       'Menu Background
  222.         H.Fore% = 1       'Help Foreground
  223.         H.Back% = 7       'Help Background
  224.         DE.Fore% = 1      'Data Entry Foreground
  225.         DE.Back% = 7      'Data Entry Background
  226.         HB.Fore% = 1      'Highlight Bar Foreground
  227.         HB.Back% = 7      'Highlight Bar Background
  228.         MB.Fore% = 1      'Menu Bar Foreground
  229.         MB.Back% = 7      'Menu Bar Background
  230.  
  231.       'Attributes are calculated as follows:
  232.       '  Foreground + (Background * 16)
  233.         S.attr% = 31
  234.         M.attr% = 23
  235.         H.attr% = 113
  236.         DE.attr% = 113
  237.         HB.attr% = 113
  238.         MB.attr% = 113
  239.  
  240.         Sh.Flag% = 48           'Transparent Shadow (0=no Shadow, 16=Solid Shadow)
  241.         EX.Flag% = 0            'Exploding Windows off (128=On)
  242.  
  243.         mode% = 0               'Color
  244.     END IF
  245.  
  246.     TIMER OFF 'Enables event trapping
  247.   
  248.  
  249.