Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - iscolor() determine if monitor has color capability http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 iscolor()           Determine if monitor has color capability
------------------------------------------------------------------------------
 Declaration
   color.hdr

 Syntax
   func logical iscolor extern

 Arguments
   None.

 Return
   A logical indicating if the monitor can display colors.

 Description
   The iscolor() function returns .t. if the current output monitor is a
   color monitor.

   This function accesses the BIOS data area to determine whether a
   color monitor is active or not. If you are not using a close IBM
   compatible computer, this function might not work.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_iscolor
   vardef
      logical lColor
   enddef
   lColor := iscolor()
   if lColor
      __syscolor[ CLR_STD ] := BLUE_WHITE
   endif
   ? "Monitor " + iifc( lColor, "has", "does not have" ) + ;
      " color capabilities"
   endproc

   proc main
   Test_iscolor()
   endproc

See Also: scrseg() vidaddr()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson