home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / vb / 3color / scroll1.txt < prev   
Encoding:
Text File  |  1994-05-27  |  3.1 KB  |  66 lines

  1.  
  2.                             ┌──────────────
  3.                             │  SCROLL1.TXT █
  4.                               ▄▄▄▄▄▄▄▄▄▄▄▄▄█
  5.  
  6.                        Fri  05-27-1994  11:25:33
  7.  
  8.      SCROLL1.EXE is a Visual BASIC for Windows (Version PRO 2.0)
  9.      demonstration program. This small program will display the color
  10.      spectrum available to you on your computer using the RGB FUNCTION.
  11.      It was made using the sample code in the "VB's Programmer's Guide"
  12.      on pages 58-60. This was an attempt to -try- to understand how the
  13.      RGB FUNCTION translated colors into HEX numbers and how those HEX
  14.      numbers relate to the color seen.
  15.  
  16.      Having migrated to Visual BASIC from QuickBASIC with its' 16
  17.      Foreground and 8 Background colors (SCREEN 0), I am greatly
  18.      confused (intimidated) by all the color potential, information, and
  19.      numbers.
  20.  
  21.      Added... then removed a Menu Help Item that would load VB.HLP, not
  22.      because I couldn't load that help file using the API FUNCTION:
  23.  
  24.      ───────────────────────────────────────────────────────────────────
  25.      Declare Function WinHelp Lib "User" (ByVal hWnd As Integer,
  26.      ByVal lpHelpFile As String, ByVal wCommand As Integer, dwData As Any)
  27.      As Integer
  28.      ───────────────────────────────────────────────────────────────────
  29.  
  30.      And issue the command in the MenuHelp_Click EVENT of:
  31.  
  32.      ───────────────────────────────────────────────────────────────────
  33.      Temp%= WinHelp(hWnd,"VB.HLP",HELP_INDEX,HELP_CONTENT)
  34.      ───────────────────────────────────────────────────────────────────
  35.  
  36.      But.... (believe it or NO...) I couldn't write code to -find-
  37.      VB.HLP on any drive and any directory. Sure this program will work
  38.      if you run SCROLL.1EXE from the same directory that contains
  39.      VB.HLP, but it will bomb if it is in =any= other directory,
  40.      including one in your PATH! So much for "Event Driven Object
  41.      Oriented Programming" being a better mouse trap. Have the same old
  42.      problems I had in Quick BASIC; "does the file exist?" and "Where is
  43.      it?"
  44.  
  45.      Think this demo is somewhat better than the one in the book;
  46.      substituted a Picture Box for a Text Box. Using a Text Box, you
  47.      could tab to it and then enter text.... in a box that was supposed
  48.      to just display a color. I was surprised that Microsoft programmers
  49.      would be so, well... cavalier in their coding.
  50.  
  51.      Then made an "About" FORM using a TIMER to cycle three IMAGE
  52.      OBJECTS that turned out fairly funny and cute. Found code that
  53.      added the -same- System Resources information that appears in the
  54.      Visual BASIC "About" DIALOG BOX in the Help Menu and popped that
  55.      in.
  56.  
  57.      Like me, you may find yourself using this program to get a feel for
  58.      colors and their HEX numbers in Visual BASIC. Find that it is
  59.      helpful when I click on the Properties Box for some OBJECT and see
  60.      some number as "&H80000008" in the Colors Property box. So.... even
  61.      though it's not Rocket Science, I'm passing it on to you.
  62.  
  63.      If you make it better, send me a copy.
  64.  
  65.      John De Palma on CompuServe 76076,571
  66.