home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FNTPAK32.ZIP / BASIC.EXE / DEMO_MON.BAS < prev    next >
BASIC Source File  |  1995-08-16  |  2KB  |  66 lines

  1. DEFINT A-Z
  2.  
  3. '$INCLUDE: 'Font_Pak.Inc'           '... For QB/PDS/VB-DOS
  4.  
  5. '======================================================== PowerBasic Users
  6. ''$INCLUDE "Font_Pak.Inc"             '... PB users, UN-REM these lines
  7.  
  8. ''$Link    "FontPakP.OBJ"             '... SHAREWARE users
  9.  
  10. ''$Link    "Video.OBJ"                '... REGISTERED users
  11. ''$Link    "Fonts.OBJ"                '... REGISTERED users
  12.  
  13. '======================================================== PowerBasic Users
  14.  
  15.  
  16. '============================================================ Demo_Mon.Bas
  17. '
  18. ' A Font Pak Demonstration         Copyright 1991-1994 Rob W. Smetana
  19. '
  20. ' Demonstrate how to determine which type of monitor is being used
  21. ' (changing text-mode fonts requires EGA/VGA).
  22. '
  23. ' Requires:    Font_Pak.Lib (QB/PDS/VB-DOS) -or- Font_Pak.Pbl (PowerBasic)
  24. '
  25. '============================================================ Demo_Mon.Bas
  26.  
  27. '***********************************************************************
  28. ' Determine display type from BIOS variables in segment zero.
  29. '***********************************************************************
  30. '
  31. ' Because GetMonitor is a function, you MUST declare it before using it.
  32. '
  33. ' Returns:
  34. '       0 => None             (no monitor?)
  35. '       1 => Monochrome Display
  36. '       3 => Color Display    (CGA)
  37. '       4 => Enhanced Display (EGA or Multi-scan)
  38. '       7 => VGA Monochrome   (VGA mono)
  39. '       8 => VGA Color        (or Multi-scan)
  40. '***********************************************************************
  41.  
  42. COLOR 7, 1: CLS
  43.  
  44. CALL fpInitialize: CLS        '=== SHAREWARE versions ONLY
  45.  
  46. WhichMonitor = GetMonitor
  47.  
  48. PRINT
  49. PRINT "GetMonitor returned"; WhichMonitor
  50. PRINT
  51. PRINT "That indicates you're using a";
  52.  
  53. SELECT CASE WhichMonitor
  54.  
  55.     CASE 1: PRINT " Monochrome";
  56.     CASE 3: PRINT " CGA";
  57.     CASE 4: PRINT "n EGA (or Multi-Scan)";
  58.     CASE 7: PRINT " VGA Mono";
  59.     CASE 8: PRINT " VGA (or Multi-Scan)";
  60.     CASE ELSE: PRINT "n UNKNOWN";
  61. END SELECT
  62.  
  63. PRINT " monitor."
  64.  
  65.  
  66.