Backcolor Equals what RGB value?

Discussion in 'AutoCAD' started by arsnik91, Jun 24, 2004.

  1. arsnik91

    arsnik91 Guest

    I would like to change the Backcolor of my textboxes following a click event. The example shows using RGB values but the actual Properties Box shows a value of &H8000000F&. I'm guessing this is a hex code of sorts but I'm not sure how to conver ti RGB. Anyone give me a hint?
     
    arsnik91, Jun 24, 2004
    #1
  2. Dim r As Byte, g As Byte, b As Byte
    'split color into rgb components
    r = (c Mod 256 ^ 2) Mod 256
    g = (c Mod 256 ^ 2) \ 256
    b = c \ 256 ^ 2

    But actually the 4th byte (&H80) designates a "system color", which you would probably need to read
    the registry for.
    Look up Color Constants in VB Help.



    using RGB values but the actual Properties Box shows a value of &H8000000F&. I'm guessing this is a
    hex code of sorts but I'm not sure how to conver t to RGB. Anyone give me a hint?
     
    Allen Johnson, Jun 24, 2004
    #2
  3. arsnik91

    arsnik91 Guest

    Thanks for the tip on what to search for in "Help". The value I was looking for equates to "vbButtonFace". I have learned something new today !
     
    arsnik91, Jun 25, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.